[PATCH 2/2] adapter: Use int for storing signed value

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

 



char can be signed or unsigned depending on architecture. This fix
following compilation error on ARM:

src/adapter.c: In function 'convert_primaries_entry`:
src/adapter:2272:2: error: comparison is always true due to limited
	range of data type [-Werror=type-limits]
cc1: all warnings being treated as errors
make[1]: *** [src/adapter.o] Error 1
---
 src/adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/adapter.c b/src/adapter.c
index a41eb15..bb54d8b 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2215,7 +2215,7 @@ failed:
 static void convert_primaries_entry(char *key, char *value, void *user_data)
 {
 	char *address = user_data;
-	char device_type = -1;
+	int device_type = -1;
 	uuid_t uuid;
 	char **services, **service, *prim_uuid;
 	char filename[PATH_MAX + 1];
-- 
1.8.0

--
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