nebgor / sma-bluetooth

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

Compile Errors lead to failure #75

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile 0.17b on Ubuntu
2.
3.

What is the expected output? What do you see instead?

When compiling:
root@lubuntu-laptop:/home/mark/Downloads/sma-bluetooth-0.17# gcc -g -o smatool 
smatool.c -lbluetooth -lcurl -lmysqlclient -lm 
smatool.c: In function ‘GetInverterSetting’:
smatool.c:1470:24: warning: format ‘%X’ expects argument of type 
‘unsigned int *’, but argument 3 has type ‘unsigned char *’ [-Wformat]
smatool.c:1473:24: warning: format ‘%X’ expects argument of type 
‘unsigned int *’, but argument 3 has type ‘unsigned char *’ [-Wformat]
smatool.c:1475:24: warning: format ‘%X’ expects argument of type 
‘unsigned int *’, but argument 3 has type ‘unsigned char *’ [-Wformat]
smatool.c:1477:24: warning: format ‘%X’ expects argument of type 
‘unsigned int *’, but argument 3 has type ‘unsigned char *’ [-Wformat]
smatool.c: In function ‘main’:
smatool.c:2059:87: warning: comparison between pointer and integer [enabled by 
default]

When running smatool:
root@lubuntu-laptop:/home/mark/Downloads/sma-bluetooth-0.17# ./smatool -v

 Error ! not all codes set
*** glibc detected *** ./smatool: double free or corruption (top): 
0x0000000000b9e060 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so6(+0x7e626)[0x7fd2eb3b8626]
/lib/x86_64-linux-gnu/libc.so.6(fclose+0x155)[0x7fd2eb3a82a5]
./smatool[0x406d12]
./smatool[0x407d20]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fd2eb35b76d]
./smatool[0x401779]
======= Memory map: ========
00400000-00410000 r-xp 00000000 08:01 934895                             
/home/mark/Downloads/sma-bluetooth-0.17/smatool
0060f000-00610000 r--p 0000f000 08:01 934895                             
/home/mark/Downloads/sma-bluetooth-0.17/smatool
00610000-00611000 rw-p 00010000 08:01 934895                             
/home/mark/Downloads/sma-bluetooth-0.17/smatool
00b9e000-00bbf000 rw-p 00000000 00:00 0                                  [heap]
7fd2e5ca5000-7fd2e5cba000 r-xp 00000000 08:01 528220                     
/lib/x86_64-linux-gnu/libgcc_s.so1
7fd2e5cba000-7fd2e5eb9000 ---p 00015000 08:01 528220                     
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fd2e5eb9000-7fd2e5eba000 r--p 00014000 08:01 528220                     
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fd2e5eba000-7fd2e5ebb000 rw-p 00015000 08:01 528220                     
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fd2e5ebb000-7fd2e5ec4000 r-xp 00000000 08:01 528207                     
/lib/x86_64-linux-gnu/libcrypt-2.15.so
7fd2e5ec4000-7fd2e60c4000 ---p 00009000 08:01 528207                     
/lib/x86_64-linux-gnu/libcrypt-2.15.so
7fd2e60c4000-7fd2e60c5000 r--p 00009000 08:01 528207                     
/lib/x86_64-linux-gnu/libcrypt-2.15.so
7fd2e60c5000-7fd2e60c6000 rw-p 0000a000 08:01 528207                     
/lib/x86_64-linux-gnu/libcrypt-2.15.so
7fd2e60c6000-7fd2e60f4000 rw-p 00000000 00:00 0 
7fd2e60f4000-7fd2e6192000 r-xp 00000000 08:01 399162                     
/usr/lib/x86_64-linux-gnu/libsqlite3so.0.8.6
7fd2e6192000-7fd2e6392000 ---p 0009e000 08:01 399162                     
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fd2e6392000-7fd2e6394000 r--p 0009e000 08:01 399162                     
/usr/lib/x86_64-linux-gnu/libsqlite3so.0.8.6
7fd2e6394000-7fd2e6396000 rw-p 000a0000 08:01 399162                     
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
7fd2e6396000-7fd2e6397000 rw-p 00000000 00:00 0 
7fd2e6397000-7fd2e63dc000 r-xp 00000000 08:01 399010                     
/usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7fd2e63dc000-7fd2e65dc000 ---p 00045000 08:01 399010                     
/usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7fd2e65dc000-7fd2e65de000 r--p 00045000 08:01 399010                     
/usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7fd2e65de000-7fd2e65e0000 rw-p 00047000 08:01 399010                     
/usr/lib/x86_64-linux-gnu/libhx509.so.5.0.0
7fd2e65e0000-7fd2e65e1000 rw-p 00000000 00:00 0 
7fd2e65e1000-7fd2e65ef000 r-xp 00000000 08:01 399004                     
/usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7fd2e65ef000-7fd2e67ee000 ---p 0000e000 08:01 399004                     
/usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7fd2e67ee000-7fd2e67ef000 r--p 0000d000 08:01 399004                     
/usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7fd2e67ef000-7fd2e67f0000 rw-p 0000e000 08:01 399004                     
/usr/lib/x86_64-linux-gnu/libheimbase.so.1.0.0
7fd2e67f0000-7fd2e6818000 r-xp 00000000 08:01 399224                     
/usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7fd2e6818000-7fd2e6a17000 ---p 00028000 08:01 399224                     
/usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7fd2e6a17000-7fd2e6a18000 r--p 00027000 08:01 399224                     
/usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7fd2e6a18000-7fd2e6a19000 rw-p 00028000 08:01 399224                     
/usr/lib/x86_64-linux-gnu/libwind.so.0.0.0
7fd2e6a19000-7fd2e6a1c000 r-xp 00000000 08:01 528230                     
/lib/x86_64-linux-gnu/libkeyutils.so.1.4
7fd2e6a1c000-7fd2e6c1b000 ---p 00003000 08:01 528230                     
/lib/x86_64-linux-gnu/libkeyutils.so.1.4
7fd2e6c1b000-7fd2e6c1c000 r--p 00002000 08:01 528230                     
/lib/x86_64-linux-gnu/libkeyutils.so.1.4
7fd2e6c1c000-7fd2e6c1d000 rw-p 00003000 08:01 528230                     
/lib/x86_64-linux-gnu/libkeyutils.so.1.4
7fd2e6c1d000-7fd2e6c20000 r-xp 00000000 08:01 528226                     
/lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7fd2e6c20000-7fd2e6e1f000 ---p 00003000 08:01 528226                     
/lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7fd2e6e1f000-7fd2e6e20000 r--p 00002000 08:01 528226                     
/lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7fd2e6e20000-7fd2e6e21000 rw-p 00003000 08:01 528226                     
/lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7fd2e6e21000-7fd2e6e32000 r-xp 00000000 08:01 399082                     
/usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0
7fd2e6e32000-7fd2e7031000 ---p 00011000 08:01 399082                     
/usr/lib/x86_64-linux-gnu/libp11-kit.so.0.00
7fd2e7031000-7fd2e7032000 r--p 00010000 08:01 399082                     
/usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0
7fd2e7032000-7fd2e7033000 rw-p 00011000 08:01 399082                     
/usr/lib/x86_64-linux-gnu/libp11-kit.so.0.00
7fd2e7033000-7fd2e7043000 r-xp 00000000 08:01 394674                     
/usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.12
7fd2e7043000-7fd2e7242000 ---p 00010000 08:01 394674                     
/usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.12
7fd2e7242000-7fd2e7243000 r--p 0000f000 08:01 394674                     
/usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.12
7fd2e7243000-7fd2e7244000 rw-p 00010000 08:01 394674                     
/usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.12
7fd2e7244000-7fd2e7258000 r-xp 00000000 08:01 399135                     
/usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7fd2e7258000-7fd2e7457000 ---p 00014000 08:01 399135                     
/usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7fd2e7457000-7fd2e7458000 r--p 00013000 08:01 399135                     
/usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7fd2e7458000-7fd2e7459000 rw-p 00014000 08:01 399135                     
/usr/lib/x86_64-linux-gnu/libroken.so.18.1.0
7fd2e7459000-7fd2e748a000 r-xp 00000000 08:01 399002                     
/usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0
7fd2e748a000-7fd2e768a000 ---p 00031000 08:01 399002                     
/usr/lib/x86_64-linux-gnu/libhcrypto.so.4.10
7fd2e768a000-7fd2e768b000 r--p 00031000 08:01 399002                     
/usr/lib/x86_64-linux-gnu/libhcrypto.so.4.1.0
7fd2e768b000-7fd2e768c000 rw-p 00032000 08:01 399002                     
/usr/lib/x86_64-linux-gnu/libhcrypto.so.4.10
7fd2e768c000-7fd2e768d000 rw-p 00000000 00:00 0 
7fd2e768d000-7fd2e7728000 r-xp 00000000 08:01 398762                     
/usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7fd2e7728000-7fd2e7927000 ---p 0009b000 08:01 398762                     
/usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7fd2e7927000-7fd2e7929000 r--p 0009a000 08:01 398762                     
/usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7fd2e7929000-7fd2e792d000 rw-p 0009c000 08:01 398762                     
/usr/lib/x86_64-linux-gnu/libasn1.so.8.0.0
7fd2e792d000-7fd2e79ad000 r-xp 00000000 08:01 399034                     
/usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7fd2e79ad000-7fd2e7bad000 ---p 00080000 08:01 399034                     
/usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7fd2e7bad000-7fd2e7baf000 r--p 00080000 08:01 399034                     
/usr/lib/x86_64-linux-gnu/libkrb5so.26.0.0
7fd2e7baf000-7fd2e7bb3000 rw-p 00082000 08:01 399034                     
/usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0
7fd2e7bb3000-7fd2e7bb9000 r-xp 00000000 08:01 399006                     
/usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7fd2e7bb9000-7fd2e7db8000 ---p 00006000 08:01 399006                     
/usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7fd2e7db8000-7fd2e7db9000 r--p 00005000 08:01 399006                     
/usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7fd2e7db9000-7fd2e7dba000 rw-p 00006000 08:01 399006                     
/usr/lib/x86_64-linux-gnu/libheimntlm.so.0.1.0
7fd2e7dba000-7fd2e7dbd000 r-xp 00000000 08:01 399108                     
/usr/lib/x86_64-linux-gnu/libplds4.so
7fd2e7dbd000-7fd2e7fbc000 ---p 00003000 08:01 399108                     
/usr/lib/x86_64-linux-gnu/libplds4.so
7fd2e7fbc000-7fd2e7fbd000 r--p 00002000 08:01 399108                     
/usr/lib/x86_64-linux-gnu/libplds4.so
7fd2e7fbd000-7fd2e7fbe000 rw-p 00003000 08:01 399108                     
/usr/lib/x86_64-linux-gnu/libplds4.so
7fd2e7fbe000-7fd2e7fc2000 r-xp 00000000 08:01 399107                     
/usr/lib/x86_64-linux-gnu/libplc4.so
7fd2e7fc2000-7fd2e81c1000 ---p 00004000 08:01 399107                     
/usr/lib/x86_64-linux-gnu/libplc4.so
7fd2e81c1000-7fd2e81c2000 r--p 00003000 08:01 399107                     
/usr/lib/x86_64-linux-gnu/libplc4.so
7fd2e81c2000-7fd2e81c3000 rw-p 00004000 08:01 399107                     
/usr/lib/x86_64-linux-gnu/libplc4.so
7fd2e81c3000-7fd2e81df000 r-xp 00000000 08:01 399073                     
/usr/lib/x86_64-linux-gnu/libnssutil3.so
7fd2e81df000-7fd2e83df000 ---p 0001c000 08:01 399073                     
/usr/lib/x86_64-linux-gnu/libnssutil3.so
7fd2e83df000-7fd2e83e5000 r--p 0001c000 08:01 399073                     
/usr/lib/x86_64-linux-gnu/libnssutil3.so
7fd2e83e5000-7fd2e83e6000 rw-p 00022000 08:01 399073                     
/usr/lib/x86_64-linux-gnu/libnssutil3.so
7fd2e83e6000-7fd2e83ed000 r-xp 00000000 08:01 399038                     
/usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fd2e83ed000-7fd2e85ec000 ---p 00007000 08:01 399038                     
/usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fd2e85ec000-7fd2e85ed000 r--p 00006000 08:01 399038                     
/usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fd2e85ed000-7fd2e85ee000 rw-p 00007000 08:01 399038                     
/usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fd2e85ee000-7fd2e85f1000 r-xp 00000000 08:01 528206                     
/lib/x86_64-linux-gnu/libcom_err.so.2.1
7fd2e85f1000-7fd2e87f0000 ---p 00003000 08:01 528206                     
/lib/x86_64-linux-gnu/libcom_err.so.2.1
7fd2e87f0000-7fd2e87f1000 r--p 00002000 08:01 528206                     
/lib/x86_64-linux-gnu/libcom_err.so.2.1
7fd2e87f1000-7fd2e87f2000 rw-p 00003000 08:01 528206                     
/lib/x86_64-linux-gnu/libcom_err.so.2.1
7fd2e87f2000-7fd2e8817000 r-xp 00000000 08:01 399032                     
/usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7fd2e8817000-7fd2e8a17000 ---p 00025000 08:01 399032                     
/usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7fd2e8a17000-7fd2e8a18000 r--p 00025000 08:01 399032                     
/usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7fd2e8a18000-7fd2e8a19000 rw-p 00026000 08:01 399032                     
/usr/lib/x86_64-linux-gnu/libk5crypto.so.3.1
7fd2e8a19000-7fd2e8a1a000 rw-p 00000000 00:00 0 
7fd2e8a1a000-7fd2e8ade000 r-xp 00000000 08:01 399036                     
/usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7fd2e8ade000-7fd2e8cdd000 ---p 000c4000 08:01 399036                     
/usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7fd2e8cdd000-7fd2e8ce7000 r--p 000c3000 08:01 399036                     
/usr/lib/x86_64-linux-gnu/libkrb5.so.3.3
7fd2e8ce7000-7fd2e8ce8000 rw-p 000cd000 08:01 399036                     
/usr/lib/x86_64-linux-gnu/libkrb5.so3.3
7fd2e8ce8000-7fd2e8d62000 r-xp 00000000 08:01 528222                     
/lib/x86_64-linux-gnu/libgcrypt.so.11.7.0
7fd2e8d62000-7fd2e8f62000 ---p 0007a000 08:01 528222                     
/lib/x86_64-linux-gnu/libgcrypt.so.11.7.0
7fd2e8f62000-7fd2e8f63000 r--p 0007a000 08:01 528222                     
/lib/x86_64-linux-gnu/libgcrypt.so.11.7.0
7fd2e8f63000-7fd2e8f66000 rw-p 0007b000 08:01 528222                     
/lib/x86_64-linux-gnu/libgcrypt.so.11.7.0
7fd2e8f66000-7fd2e901a000 r-xp 00000000 08:01 398933                     
/usr/lib/x86_64-linux-gnu/libgnutls.so.26.21.8
7fd2e901a000-7fd2e921a000 ---p 000b4000 08:01 398933                     
/usr/lib/x86_64-linux-gnu/libgnutls.so.26.21.8
7fd2e921a000-7fd2e9220000 r--p 000b4000 08:01 398933                     
/usr/lib/x86_64-linux-gnu/libgnutls.so.26.21.8
7fd2e9220000-7fd2e9221000 rw-p 000ba000 08:01 398933                     
/usr/lib/x86_64-linux-gnu/libgnutls.so.26.21.8
7fd2e9221000-7fd2e9222000 rw-p 00000000 00:00 0 
7fd2e9222000-7fd2e925c000 r-xp 00000000 08:01 398942                     
/usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7fd2e925c000-7fd2e945c000 ---p 0003a000 08:01 398942                     
/usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7fd2e945c000-7fd2e945d000 r--p 0003a000 08:01 398942                     
/usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7fd2e945d000-7fd2e9460000 rw-p 0003b000 08:01 398942                     
/usr/lib/x86_64-linux-gnu/libgssapi.so.3.0.0
7fd2e9460000-7fd2e947a000 r-xp 00000000 08:01 399147                     
/usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7fd2e947a000-7fd2e9679000 ---p 0001a000 08:01 399147                     
/usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7fd2e9679000-7fd2e967a000 r--p 00019000 08:01 399147                     
/usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7fd2e967a000-7fd2e967b000 rw-p 0001a000 08:01 399147                     
/usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
7fd2e967b000-7fd2e9693000 r-xp 00000000 08:01 528283                     
/lib/x86_64-linux-gnu/libresolv-2.15.so
7fd2e9693000-7fd2e9893000 ---p 00018000 08:01 528283                     
/lib/x86_64-linux-gnu/libresolv-2.15.so
7fd2e9893000-7fd2e9894000 r--p 00018000 08:01 528283                     
/lib/x86_64-linux-gnu/libresolv-215.so
7fd2e9894000-7fd2e9895000 rw-p 00019000 08:01 528283                     
/lib/x86_64-linux-gnu/libresolv-2.15.so
7fd2e9895000-7fd2e9897000 rw-p 00000000 00:00 0 
7fd2e9897000-7fd2e9899000 r-xp 00000000 08:01 528212                     
/lib/x86_64-linux-gnu/libdl-2.15.so
7fd2e9899000-7fd2e9a99000 ---p 00002000 08:01 528212                     
/lib/x86_64-linux-gnu/libdl-2.15.so
7fd2e9a99000-7fd2e9a9a000 r--p 00002000 08:01 528212                     
/lib/x86_64-linux-gnu/libdl-2.15.so
7fd2e9a9a000-7fd2e9a9b000 rw-p 00003000 08:01 528212                     
/lib/x86_64-linux-gnu/libdl-2.15.so
7fd2e9a9b000-7fd2e9ab3000 r-xp 00000000 08:01 399140                     
/usr/lib/x86_64-linux-gnu/librtmp.so.0
7fd2e9ab3000-7fd2e9cb3000 ---p 00018000 08:01 399140                     
/usr/lib/x86_64-linux-gnu/librtmp.so.0
7fd2e9cb3000-7fd2e9cb4000 r--p 00018000 08:01 399140                     
/usr/lib/x86_64-linux-gnu/librtmp.so.0
7fd2e9cb4000-7fd2e9cb5000 rw-p 00019000 08:01 399140                     
/usr/lib/x86_64-linux-gnu/librtmp.so.0
7fd2e9cb5000-7fd2e9ccd000 r-xp 00000000 08:01 528279                     
/lib/x86_64-linux-gnu/libpthread-2.15.so
7fd2e9ccd000-7fd2e9ecc000 ---p 00018000 08:01 528279                     
/lib/x86_64-linux-gnu/libpthread-2.15.so
7fd2e9ecc000-7fd2e9ecd000 r--p 00017000 08:01 528279                     
/lib/x86_64-linux-gnu/libpthread-2.15.so
7fd2e9ecd000-7fd2e9ece000 rw-p 00018000 08:01 528279                     
/lib/x86_64-linux-gnu/libpthread-2.15.soAborted (core dumped)

What version of the product are you using? On what operating system?
0.17b on Lubuntu 12.04

Please provide any additional information below.

I seem to get the above error no matter what I attempt to do.

Original issue reported on code.google.com by m...@msmith.com.au on 10 May 2012 at 2:24

GoogleCodeExporter commented 9 years ago
I'm getting the same type of error. I'm trying to get it working on my openwrt 
netgear wndr3700 (mips). Compiling it on a ubuntu box with -Wall shows the 
following:

make[3]: Entering directory 
`/home/stefan/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33/sma-bluetooth
-0.17'
mips-openwrt-linux-uclibc-gcc -lbluetooth -lcurl -lm 
-L/home/stefan/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33/usr/lib/my
sql -lmysqlclient -g -Wall -o smatool smatool.c
cc1: note: someone does not honour COPTS correctly, passed 0 times
smatool.c: In function 'fix_length_send':
smatool.c:212:13: warning: variable 'delta' set but not used 
[-Wunused-but-set-variable]
smatool.c: In function 'fix_length_received':
smatool.c:265:13: warning: variable 'delta' set but not used 
[-Wunused-but-set-variable]
smatool.c: In function 'get_timezone_in_seconds':
smatool.c:597:10: warning: variable 'returntime' set but not used 
[-Wunused-but-set-variable]
smatool.c: In function 'auto_set_dates':
smatool.c:967:44: warning: variable 'second' set but not used 
[-Wunused-but-set-variable]
smatool.c: In function 'GetInverterSetting':
smatool.c:1470:24: warning: format '%X' expects argument of type 'unsigned int 
*', but argument 3 has type 'unsigned char *' [-Wformat]
smatool.c:1470:24: warning: format '%X' expects argument of type 'unsigned int 
*', but argument 3 has type 'unsigned char *' [-Wformat]
smatool.c:1473:24: warning: format '%X' expects argument of type 'unsigned int 
*', but argument 3 has type 'unsigned char *' [-Wformat]
smatool.c:1473:24: warning: format '%X' expects argument of type 'unsigned int 
*', but argument 3 has type 'unsigned char *' [-Wformat]
smatool.c:1475:24: warning: format '%X' expects argument of type 'unsigned int 
*', but argument 3 has type 'unsigned char *' [-Wformat]
smatool.c:1475:24: warning: format '%X' expects argument of type 'unsigned int 
*', but argument 3 has type 'unsigned char *' [-Wformat]
smatool.c:1477:24: warning: format '%X' expects argument of type 'unsigned int 
*', but argument 3 has type 'unsigned char *' [-Wformat]
smatool.c:1477:24: warning: format '%X' expects argument of type 'unsigned int 
*', but argument 3 has type 'unsigned char *' [-Wformat]
smatool.c: In function 'main':
smatool.c:2059:87: warning: comparison between pointer and integer [enabled by 
default]
smatool.c:2580:12: warning: "/*" within comment [-Wcomment]
smatool.c:2747:19: warning: variable 'starttotal' set but not used 
[-Wunused-but-set-variable]
smatool.c:1750:47: warning: variable 'datapoint' set but not used 
[-Wunused-but-set-variable]
smatool.c:1726:43: warning: variable 'rangedatastarted' set but not used 
[-Wunused-but-set-variable]
smatool.c:1726:28: warning: variable 'setupstarted' set but not used 
[-Wunused-but-set-variable]
smatool.c:1726:14: warning: variable 'initstarted' set but not used 
[-Wunused-but-set-variable]
smatool.c:1724:13: warning: variable 'ret' set but not used 
[-Wunused-but-set-variable]
smatool.c:1811:19: warning: 'returnkeylist' may be used uninitialized in this 
function [-Wuninitialized]
smatool.c:2418:51: warning: 'crc_at_end' may be used uninitialized in this 
function [-Wuninitialized]
make[3]: Leaving directory 
`/home/stefan/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33/sma-bluetooth
-0.17'

Original comment by stefan.v...@gmail.com on 13 May 2012 at 10:40

GoogleCodeExporter commented 9 years ago
try the official instructions:
gcc -lbluetooth -lcurl -lmysqlclient -g -o smatool smatool.c

Original comment by mcknigh...@gmail.com on 16 May 2012 at 7:10

GoogleCodeExporter commented 9 years ago
That generates a i386 binary, which doesn't run on the openwrt (netgear 
wndr3700) mips based router.

Original comment by stefan.v...@gmail.com on 16 May 2012 at 8:24

GoogleCodeExporter commented 9 years ago
Hi,
i will get my solar system at monday and so im now reading the source of 
smatool as i possibly will run into the ADDR2 bug.

First thing i have created is a c makro to replace all if(debug == 1) 
printf(..):

#define debug_printf(...) if( debug == 1 ) { printf("%s line %d: ", __FILE__, 
__LINE__); printf (__VA_ARGS__); }

When you use this and use the -d you will get an idea from which line of code 
your coredump is comming from.

Original comment by janus44...@gmail.com on 19 May 2012 at 3:19

GoogleCodeExporter commented 9 years ago
On fedora 16 I got the same issue:

 sma-bluetooth-0.17]# gcc -L/usr/lib64/mysql/ -lm -lbluetooth -lcurl -lmysqlclient -g -o smatool smatool.c
smatool.c: In function âmainâ:
smatool.c:2059:87: warning: comparison between pointer and integer [enabled by 
default]

Original comment by sendtore...@gmail.com on 25 May 2012 at 6:40