linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] adapter: Fix compilation on some architectures
@ 2012-12-05 10:02 Szymon Janc
  2012-12-05 10:29 ` Johan Hedberg
  0 siblings, 1 reply; 6+ messages in thread
From: Szymon Janc @ 2012-12-05 10:02 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

plain char may be treated as signed or unsigned depending on compiler
(as oposite to other integer types). Use signed char explicitly when
signed type is needed.

This fix following compilation error on ARM:

  CC     src/bluetoothd-adapter.o
src/adapter.c: In function ‘convert_entry’:
src/adapter.c:2710: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/bluetoothd-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 3c5d277..0cbce78 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2673,7 +2673,7 @@ static void convert_ltk_entry(GKeyFile *key_file, void *value)
 static void convert_entry(char *key, char *value, void *user_data)
 {
 	struct device_converter *converter = user_data;
-	char device_type = -1;
+	signed char device_type = -1;
 	char filename[PATH_MAX + 1];
 	GKeyFile *key_file;
 	char *data;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-12-05 14:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-05 10:02 [PATCH] adapter: Fix compilation on some architectures Szymon Janc
2012-12-05 10:29 ` Johan Hedberg
2012-12-05 11:06   ` Szymon Janc
2012-12-05 11:14     ` Johan Hedberg
2012-12-05 12:32       ` [PATCH] adapter: Always write address type when converting to new storage Szymon Janc
2012-12-05 14:28         ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).