linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] input: Fix compilation errors on 32 bit machine
@ 2014-05-14 19:49 Szymon Janc
  2014-05-14 19:49 ` [PATCH 2/3] hog: Fix compilation error " Szymon Janc
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Szymon Janc @ 2014-05-14 19:49 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

Fix following with GCC version 4.8.2 (Debian 4.8.2-21):

  CC       profiles/input/bluetoothd-device.o
profiles/input/device.c: In function ‘uhid_send_feature_answer’:
profiles/input/device.c:232:8: error: format ‘%lu’ expects argument
  of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
   [-Werror=format=]
        len, sizeof(ev));
        ^
profiles/input/device.c: In function ‘uhid_send_input_report’:
profiles/input/device.c:274:8: error: format ‘%lu’ expects argument of
   type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
   [-Werror=format=]
        len, sizeof(ev));
        ^
---
 profiles/input/device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/profiles/input/device.c b/profiles/input/device.c
index 3e89e2d..52222ea 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -228,7 +228,7 @@ static bool uhid_send_feature_answer(struct input_device *idev,
 
 	/* uHID kernel driver does not handle partial writes */
 	if ((size_t) len < sizeof(ev)) {
-		error("uHID dev write error: partial write (%zd of %lu bytes)",
+		error("uHID dev write error: partial write (%zd of %zu bytes)",
 							len, sizeof(ev));
 		return false;
 	}
@@ -270,7 +270,7 @@ static bool uhid_send_input_report(struct input_device *idev,
 
 	/* uHID kernel driver does not handle partial writes */
 	if ((size_t) len < sizeof(ev)) {
-		error("uHID dev write error: partial write (%zd of %lu bytes)",
+		error("uHID dev write error: partial write (%zd of %zu bytes)",
 							len, sizeof(ev));
 		return false;
 	}
-- 
2.0.0.rc2


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

* [PATCH 2/3] hog: Fix compilation error on 32 bit machine
  2014-05-14 19:49 [PATCH 1/3] input: Fix compilation errors on 32 bit machine Szymon Janc
@ 2014-05-14 19:49 ` Szymon Janc
  2014-05-14 19:49 ` [PATCH 3/3] tools: Fix hex2hcd compilation error Szymon Janc
  2014-05-14 20:15 ` [PATCH 1/3] input: Fix compilation errors on 32 bit machine Johan Hedberg
  2 siblings, 0 replies; 4+ messages in thread
From: Szymon Janc @ 2014-05-14 19:49 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

Fix following with GCC version 4.8.2 (Debian 4.8.2-21):

  CC       profiles/input/bluetoothd-hog.o
profiles/input/hog.c: In function ‘report_value_cb’:
profiles/input/hog.c:149:8: error: format ‘%lu’ expects argument of
   type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
    [-Werror=format=]
        status, sizeof(ev));
        ^
---
 profiles/input/hog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index c196f65..e82e827 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -145,7 +145,7 @@ static void report_value_cb(const guint8 *pdu, guint16 len, gpointer user_data)
 
 	/* uHID kernel driver does not handle partial writes */
 	if ((size_t) status < sizeof(ev)) {
-		error("uHID dev write error: partial write (%zd of %lu bytes)",
+		error("uHID dev write error: partial write (%zd of %zu bytes)",
 							status, sizeof(ev));
 		return;
 	}
-- 
2.0.0.rc2


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

* [PATCH 3/3] tools: Fix hex2hcd compilation error
  2014-05-14 19:49 [PATCH 1/3] input: Fix compilation errors on 32 bit machine Szymon Janc
  2014-05-14 19:49 ` [PATCH 2/3] hog: Fix compilation error " Szymon Janc
@ 2014-05-14 19:49 ` Szymon Janc
  2014-05-14 20:15 ` [PATCH 1/3] input: Fix compilation errors on 32 bit machine Johan Hedberg
  2 siblings, 0 replies; 4+ messages in thread
From: Szymon Janc @ 2014-05-14 19:49 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

Fix following with GCC version 4.8.2 (Debian 4.8.2-21):

tools/hex2hcd.c: In function ‘main’:
tools/hex2hcd.c:118:19: error: comparison between signed and
  unsigned integer expressions [-Werror=sign-compare]
     for (i = 0; i < hex_to_int(rbuf + 1); i++) {
                   ^
cc1: all warnings being treated as errors
---
 tools/hex2hcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/hex2hcd.c b/tools/hex2hcd.c
index c5e5e1f..d9b5d3b 100644
--- a/tools/hex2hcd.c
+++ b/tools/hex2hcd.c
@@ -70,10 +70,10 @@ static int check_hex_line(const char *str, unsigned int len)
 
 int main(int argc, char *argv[])
 {
-	unsigned int addr = 0;
+	unsigned int i, addr = 0;
 	FILE *ifp, *ofp;
 	char *rbuf;
-	ssize_t len, i;
+	ssize_t len;
 	size_t buflen;
 
 	if (argc != 3) {
-- 
2.0.0.rc2


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

* Re: [PATCH 1/3] input: Fix compilation errors on 32 bit machine
  2014-05-14 19:49 [PATCH 1/3] input: Fix compilation errors on 32 bit machine Szymon Janc
  2014-05-14 19:49 ` [PATCH 2/3] hog: Fix compilation error " Szymon Janc
  2014-05-14 19:49 ` [PATCH 3/3] tools: Fix hex2hcd compilation error Szymon Janc
@ 2014-05-14 20:15 ` Johan Hedberg
  2 siblings, 0 replies; 4+ messages in thread
From: Johan Hedberg @ 2014-05-14 20:15 UTC (permalink / raw)
  To: Szymon Janc; +Cc: linux-bluetooth

Hi Szymon,

On Wed, May 14, 2014, Szymon Janc wrote:
> Fix following with GCC version 4.8.2 (Debian 4.8.2-21):
> 
>   CC       profiles/input/bluetoothd-device.o
> profiles/input/device.c: In function ‘uhid_send_feature_answer’:
> profiles/input/device.c:232:8: error: format ‘%lu’ expects argument
>   of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
>    [-Werror=format=]
>         len, sizeof(ev));
>         ^
> profiles/input/device.c: In function ‘uhid_send_input_report’:
> profiles/input/device.c:274:8: error: format ‘%lu’ expects argument of
>    type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
>    [-Werror=format=]
>         len, sizeof(ev));
>         ^
> ---
>  profiles/input/device.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

All three patches have been applied. Thanks.

Johan

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

end of thread, other threads:[~2014-05-14 20:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14 19:49 [PATCH 1/3] input: Fix compilation errors on 32 bit machine Szymon Janc
2014-05-14 19:49 ` [PATCH 2/3] hog: Fix compilation error " Szymon Janc
2014-05-14 19:49 ` [PATCH 3/3] tools: Fix hex2hcd compilation error Szymon Janc
2014-05-14 20:15 ` [PATCH 1/3] input: Fix compilation errors on 32 bit machine 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).