25 May 2011 11:21
[PATCH 1/2] Fix build errors on obex_test tool when using gcc 4.6
Luiz Augusto von Dentz <luiz.dentz <at> gmail.com>
2011-05-25 09:21:12 GMT
2011-05-25 09:21:12 GMT
From: Luiz Augusto von Dentz <luiz.von.dentz <at> intel.com>
make[3]: Entering directory `/home/vudentz/git/openobex/apps/obex_test'
CC obex_test_client.o
obex_test_client.c: In function ‘push_client’:
obex_test_client.c:229:6: error: variable ‘num’ set but not used
obex_test_client.c: In function ‘put_client’:
obex_test_client.c:290:6: error: variable ‘num’ set but not used
obex_test_client.c: In function ‘get_client’:
obex_test_client.c:347:6: error: variable ‘num’ set but not used
obex_test_client.c: In function ‘setpath_client’:
obex_test_client.c:418:6: error: variable ‘num’ set but not used
cc1: all warnings being treated as errors
---
apps/obex_test/obex_test_client.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/apps/obex_test/obex_test_client.c b/apps/obex_test/obex_test_client.c
index 0bf5d42..fc54e20 100644
--- a/apps/obex_test/obex_test_client.c
+++ b/apps/obex_test/obex_test_client.c
<at> <at> -235,6 +235,11 <at> <at> void push_client(obex_t *handle)
printf("PUSH filename> ");
num = scanf("%s", fname);
+ if (num != 1) {
+ perror("scanf");
+ return;
+ }
+
(Continue reading)
RSS Feed