[PATCH] btio: Fix uninitialized usage compilation error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When compiling with --enable-maintainer-mode these throw
errors because of -Werror=maybe-uninitialized

---
 btio/btio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/btio/btio.c b/btio/btio.c
index 6277507..4ec286c 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -970,7 +970,7 @@ static gboolean l2cap_get(int sock, GError **err, BtIOOption opt1,
 	struct l2cap_options l2o;
 	int flags;
 	uint8_t dev_class[3];
-	uint16_t handle;
+	uint16_t handle = 0;
 	socklen_t len;
 	gboolean flushable = FALSE, have_dst = FALSE;
 	uint32_t priority;
@@ -1180,7 +1180,7 @@ static gboolean rfcomm_get(int sock, GError **err, BtIOOption opt1,
 	int flags;
 	socklen_t len;
 	uint8_t dev_class[3];
-	uint16_t handle;
+	uint16_t handle = 0;
 
 	if (!get_src(sock, &src, sizeof(src), err))
 		return FALSE;
@@ -1311,7 +1311,7 @@ static gboolean sco_get(int sock, GError **err, BtIOOption opt1, va_list args)
 	struct sco_options sco_opt;
 	socklen_t len;
 	uint8_t dev_class[3];
-	uint16_t handle;
+	uint16_t handle = 0;
 
 	len = sizeof(sco_opt);
 	memset(&sco_opt, 0, len);
-- 
2.1.0.rc2.206.gedb03e5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux