MantisBT - Zandronum
View Issue Details
0001974Zandronum[All Projects] Bugpublic2014-10-27 10:232020-05-05 22:05
Edward-san 
 
normaltweakalways
closedinvalid 
1.3 
 
0001974: Collection of various compiler warnings
This ticket is intended to post all the warnings GCC, Clang, MSVC, etc are found, while ignoring the GZDoom codebase ones.

To filter them, the only way I know is to compile gzdoom r900 (from this git repository:'https://github.com/doomtech/gzdoom [^]' ) in Release mode and save the warnings to a file; then compile zandronum 2.0 beta in Release mode and save the warnings to a file; compare them and remove the common warnings from both files.

There's a problem while compiling gzdoom r900 in non-Windows targets and it can be fixed with the attached patch compile-gzdoom900-linux.diff.txt (it's available only for linux targets for now).

I suggest to avoid using the old gzdoom r323 as codebase, because it doesn't compile with linux and requires some workarounds.

Currently, it's not possible to compile gzdoom and zandronum with clang, because its support in gzdoom was added a lot later.

It's possible to post non-default warnings, if they make sense.
No tags attached.
txt compile-gzdoom900-linux.diff.txt (1,070) 2014-10-27 10:30
/tracker/file_download.php?file_id=1317&type=bug
txt zandronum_2.x_warns_gcc.txt (18,478) 2014-10-27 13:02
/tracker/file_download.php?file_id=1318&type=bug
txt zandronum_2.x_warns_gcc_castqual.txt (23,725) 2014-10-27 23:29
/tracker/file_download.php?file_id=1319&type=bug
Issue History
2014-10-27 10:23Edward-sanNew Issue
2014-10-27 10:23Edward-sanStatusnew => assigned
2014-10-27 10:23Edward-sanAssigned To => Edward-san
2014-10-27 10:30Edward-sanDescription Updatedbug_revision_view_page.php?rev_id=5872#r5872
2014-10-27 10:30Edward-sanFile Added: compile-gzdoom900-linux.diff.txt
2014-10-27 10:31Edward-sanDescription Updatedbug_revision_view_page.php?rev_id=5873#r5873
2014-10-27 13:02Edward-sanFile Added: zandronum_2.x_warns_gcc.txt
2014-10-27 13:15Edward-sanNote Added: 0010704
2014-10-27 23:29Edward-sanFile Added: zandronum_2.x_warns_gcc_castqual.txt
2014-10-27 23:40Edward-sanNote Edited: 0010704bug_revision_view_page.php?bugnote_id=10704#r5875
2020-05-05 22:05Edward-sanNote Added: 0021314
2020-05-05 22:05Edward-sanStatusassigned => closed
2020-05-05 22:05Edward-sanAssigned ToEdward-san =>
2020-05-05 22:05Edward-sanResolutionopen => invalid

Notes
(0010704)
Edward-san   
2014-10-27 13:15   
(edited on: 2014-10-27 23:40)
Attached what I get myself with gcc 4.9.1 on ubuntu linux x86_64.

All the reported -Wmaybe-uninitialized warnings are false positives (the one in cl_main.cpp is idiocy, the ones in g_raven/a_artitele.cpp are because the function I_Error (I_FatalError, too) does not have the 'noreturn' attribute).

[edit]Added also what I get if I add -Wcast-qual to the compiler options.

(0021314)
Edward-san   
2020-05-05 22:05   
This can be closed. Some of these warnings were fixed over the course of time. It lost its momentum, given that the mentioned warnings rarely refer to 'broken code', so it's fine as is.