[gnome-bluetooth] lib: Fix compile time warning in pin.c
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] lib: Fix compile time warning in pin.c
- Date: Wed, 15 Nov 2017 12:52:45 +0000 (UTC)
commit a84549cd9bac92df62ef6c3e831396a68816a4f9
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 15 13:37:19 2017 +0100
lib: Fix compile time warning in pin.c
warning: ‘hwdb’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Initialise hwdb and udev to NULL to avoid this warning and the fallout
if hwdb initialisation fails.
lib/pin.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/pin.c b/lib/pin.c
index f3248d1..dceb295 100644
--- a/lib/pin.c
+++ b/lib/pin.c
@@ -40,8 +40,8 @@
char *
oui_to_vendor (const char *oui)
{
- struct udev *udev;
- struct udev_hwdb *hwdb;
+ struct udev *udev = NULL;
+ struct udev_hwdb *hwdb = NULL;
struct udev_list_entry *list, *l;
char *modalias = NULL;
char *vendor = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]