Closed haoNoQ closed 10 years ago
Some of the more interesting errors include:
[ 0%] Building CXX object code/CMakeFiles/openjk_sp.i386.dir/client/cl_scrn.cpp.o
[ 1%] Building CXX object code/CMakeFiles/openjk_sp.i386.dir/client/cl_ui.cpp.o
/home/noq/openjk/OpenJK/code/client/cl_ui.cpp: In function ‘int FloatAsInt(float)’:
/home/noq/openjk/OpenJK/code/client/cl_ui.cpp:150:13: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
cc1plus: all warnings being treated as errors
make[2]: *** [code/CMakeFiles/openjk_sp.i386.dir/client/cl_ui.cpp.o] Error 1
make[1]: *** [code/CMakeFiles/openjk_sp.i386.dir/all] Error 2
make: *** [all] Error 2
and
Scanning dependencies of target openjk_sp.i386
[ 0%] Building CXX object code/CMakeFiles/openjk_sp.i386.dir/client/snd_music.cpp.o
[ 0%] Building CXX object code/CMakeFiles/openjk_sp.i386.dir/qcommon/cm_load.cpp.o
/home/noq/openjk/OpenJK/code/qcommon/cm_load.cpp:1313:12: error: multi-character character constant [-Werror=multichar]
/home/noq/openjk/OpenJK/code/qcommon/cm_load.cpp:1326:10: error: multi-character character constant [-Werror=multichar]
cc1plus: all warnings being treated as errors
make[2]: *** [code/CMakeFiles/openjk_sp.i386.dir/qcommon/cm_load.cpp.o] Error 1
make[1]: *** [code/CMakeFiles/openjk_sp.i386.dir/all] Error 2
make: *** [all] Error 2
What i have so far: http://pastebin.com/JvnJ5HJx
hmm ... or maybe the endianness is the other way round? ... i guess better not trust me on that.
Please try and avoid quadruple-posting like this, some of us don't appreciate the mass emails. Thanks. Anyway, don't treat the warnings as errors in the compiler, I don't think all warnings are necessarily able to be eliminated in all cases (see: MSVC warning 4996, which floods the compiler every time you DARE use strcmp/stricmp/strcpy/strncpy/strncat)
I've dealt with most of the ones you've shown. Going to leave the multi-character as is for now and have @xycaleth deal with them. We don't want to change what gets written to the save files so we have to be extra careful size/type wise. And as im on msvc/windows I can't see these errors.
Using this makefile : https://github.com/Yberion/OpenJK/blob/master/codemp/Makefile
I get these errors : http://pastebin.com/8GfPPivs
That makefile isn't supported.
Bump multi char constants: http://slexy.org/view/s20hf84fPd unsigned long's should probably get replaced to uint32_t with regards to chid stuff.
I think these aren't errors anymore and most of the warnings are gone. @xycaleth / @haoNoQ close?
Here's what i have:
cmake -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_C_FLAGS=-m32 -DCMAKE_SHARED_LINKER_FLAGS=-m32 -DCMAKE_SIZEOF_VOID_P=4 .. > cmake.haoNoQ.log 2>&1
make -j5 > make.haoNoQ.log 2>&1
That's a lot of warnings, but they're mostly simple.
But the linux builders aren't producing nearly that many warnings.
Debian (used by the builder) uses an older version of GCC which may not be so strict in its default warning reporting.
Having this sort of compile errors, for example:
Will try to eliminate them myself. Using gcc 4.7.1 20120721 (linux x86)