nebgor / sma-bluetooth

Automatically exported from code.google.com/p/sma-bluetooth
0 stars 0 forks source link

compile error on Ubuntu 10.10 #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Host System Ubuntu 10.10

uname -a
Linux penni-ubuntu 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 
2010 i686 GNU/Linux

root@kenny-ubuntu:/home/kenny/sma/sma-bluetooth0.3# gcc -lbluetooth -lcurl 
-lmysqlclient -g -o smatool smatool.c
smatool.c: In function ‘main’:
smatool.c:1406: warning: too few arguments for format
smatool.c:1548: warning: format ‘%03x’ expects type ‘unsigned int’, but 
argument 2 has type ‘time_t’
smatool.c:1575: warning: format ‘%03x’ expects type ‘unsigned int’, but 
argument 2 has type ‘time_t’
smatool.c:1600: warning: format ‘%03x’ expects type ‘unsigned int’, but 
argument 2 has type ‘time_t’
smatool.c:1628: warning: format ‘%03x’ expects type ‘unsigned int’, but 
argument 2 has type ‘time_t’
smatool.c:1832: warning: format ‘%d’ expects type ‘int’, but argument 2 
has type ‘time_t’
smatool.c:1832: warning: format ‘%d’ expects type ‘int’, but argument 3 
has type ‘time_t’
smatool.c:1915: warning: unknown conversion type character 0xa in format
smatool.c:1951: warning: format ‘%d’ expects type ‘int’, but argument 5 
has type ‘long unsigned int

Original issue reported on code.google.com by rabim...@arcor.de on 12 Jan 2011 at 8:59

GoogleCodeExporter commented 8 years ago
my gcc must be lazy since I didn't get those :) - 
:1406 should be "printf("[Debug]   waiting for: ");" 
:1548 - remove, its a broken version of the line above
:1600 - as above and :1628
:1832 needs to be - "printf( "Date Error! prev=%d current=%d\n", 
(int)prev_idate, (int)idate );" or similar
:1915 seems to have gotten a tab char - change to "printf("bluetooth signal = 
%.0f%\n",strength);"
:1950 - change to "...( FROM_UNIXTIME(%ld),\'%s\',%ld,%0.f, %.3f )..."

maybe add -pedantic to the compile commands too :)

Original comment by b...@ticm.com on 13 Jan 2011 at 12:48

GoogleCodeExporter commented 8 years ago
I'll have a look.

Original comment by stephenb...@gmail.com on 13 Jan 2011 at 6:18

GoogleCodeExporter commented 8 years ago
All I could see have been fixed plus some others it didn't catch.

Original comment by stephenb...@gmail.com on 13 Jan 2011 at 6:37