I'm trying to compile tftpserver v1.51 but am running into a few compile errors (and some warnings as well):
g++ -O -g -Wall -rdynamic -export-dynamic -lpthread -o tftpserver.o -c tftpserver.cpp
tftpserver.cpp: In function ‘void* processRequest(void*)’:
tftpserver.cpp:474: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:691: error: cast from ‘char*’ to ‘unsigned int’ loses precision
tftpserver.cpp:691: error: cast from ‘ack*’ to ‘unsigned int’ loses precision
tftpserver.cpp:741: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:746: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:877: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:904: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:983: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:1007: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:301: warning: unused variable ‘logbuff’
tftpserver.cpp: In function ‘void init()’:
tftpserver.cpp:1450: warning: too many arguments for format
tftpserver.cpp:1632: warning: comparison between signed and unsigned integer expressions
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had this same issue with g++ 4.2.1 on OSX, though I don't think its a compiler issue per se.
I had previously installed boost libraries and headers installed to /usr/local/lib and /usr/local/include by invoking b2 install. This works on a new installation, but it doesn't correctly overwrite a previous boost installation (I had 1.49). All I had to do was point my build at the boost build directory I was using, or to delete /usr/local/include/boost and run b2 install again. The first time I ran b2 install it only copied the libs which was fast, the second time it took much longer and copied over all the header files.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm trying to compile tftpserver v1.51 but am running into a few compile errors (and some warnings as well):
g++ -O -g -Wall -rdynamic -export-dynamic -lpthread -o tftpserver.o -c tftpserver.cpp
tftpserver.cpp: In function ‘void* processRequest(void*)’:
tftpserver.cpp:474: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:691: error: cast from ‘char*’ to ‘unsigned int’ loses precision
tftpserver.cpp:691: error: cast from ‘ack*’ to ‘unsigned int’ loses precision
tftpserver.cpp:741: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:746: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:877: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:904: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:983: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:1007: warning: comparison between signed and unsigned integer expressions
tftpserver.cpp:301: warning: unused variable ‘logbuff’
tftpserver.cpp: In function ‘void init()’:
tftpserver.cpp:1450: warning: too many arguments for format
tftpserver.cpp:1632: warning: comparison between signed and unsigned integer expressions
Thanks!
Hi,
This was 64bit bug, which is fixed in V 1.52. Please retry the compile with new file, warnings may still come, but it would compile and work fine.
Thanks for pointing this out.
Hi achaldhir,
I tested again with 1.52 and everything compiles fine. Thanks again!
-Chad
I had this same issue with g++ 4.2.1 on OSX, though I don't think its a compiler issue per se.
I had previously installed boost libraries and headers installed to /usr/local/lib and /usr/local/include by invoking b2 install. This works on a new installation, but it doesn't correctly overwrite a previous boost installation (I had 1.49). All I had to do was point my build at the boost build directory I was using, or to delete /usr/local/include/boost and run b2 install again. The first time I ran b2 install it only copied the libs which was fast, the second time it took much longer and copied over all the header files.