Bug Tracker – Bug 36

compiler warnings

Last modified: 2008-05-04 13:08:07 UTC
Bug 36 - compiler warnings
Summary: compiler warnings
Status: RESOLVED FIXED
Alias: None
Product: Odamex
Classification: Unclassified
Component: Server & Client (show other bugs)
Version: (old) 0.0.1
Hardware: All All
: P2 minor
Assignee: Denis Lukianov
URL:
Depends on:
Blocks:
 
Reported: 2005-10-07 02:06 UTC by Denis Lukianov
Modified: 2008-05-04 13:08 UTC (History)
0 users

See Also:

Attachments

GCC 4.2.1 warnings with r377 (244.21 KB, text/plain)
2007-10-03 00:53 UTC, Dean Joseph
Details
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Lukianov 2005-10-07 02:06:19 UTC
To many people, compiler warnings are an indicator of the quality of code. Fix
all compiler warnings for all platforms, then treat warnings as errors.

There are no easy ways to fix many of the errors, for example, use of NULL in
the lzo library arithmetic and use of offsetof macro on non-POD datatypes simply
because the struct was inherited from another struct. This needs thought.
Comment 1 Mike Lightner 2006-02-02 22:17:46 UTC
Bug accepted.
Comment 2 Denis Lukianov 2006-02-24 23:25:50 UTC
From r941, we have 0 gcc warnings at the default warning level.
I have therefore increased the warning level to "-Wall", at which there are about 371 warnings (including 219 trivial signed/unsigned warnings).

I will be satisfied to close this bug when the warning count reaches 0 at the "-Wall" warning level. Further levels like "-pedantic -Wanal" should be up to individuals to try out.
Comment 3 Denis Lukianov 2006-02-25 00:14:22 UTC
r943: 115 warnings (including 35 trivial signed/unsigned)
Comment 4 Dean Joseph 2006-03-10 18:49:35 UTC
r1054: 1072 warnings with -Wall

I notice p_lnspec.cpp mentions the same seven unused parameters an atonishing large amount of times. Here are the params:

..\..\common\p_lnspec.cpp:1036: warning: unused parameter 'ln'
..\..\common\p_lnspec.cpp:1036: warning: unused parameter 'it'
..\..\common\p_lnspec.cpp:1036: warning: unused parameter 'arg0'
..\..\common\p_lnspec.cpp:1036: warning: unused parameter 'arg1'
..\..\common\p_lnspec.cpp:1036: warning: unused parameter 'arg2'
..\..\common\p_lnspec.cpp:1036: warning: unused parameter 'arg3'
..\..\common\p_lnspec.cpp:1036: warning: unused parameter 'arg4'
Comment 5 Dean Joseph 2006-03-10 18:51:25 UTC
Come to think about it, the arg* params sounds like it's related to ACS code.
Comment 6 Mike Lightner 2006-03-12 18:27:30 UTC
It's not directly related to hexen code, standard doom specials pass arguments and if not all are passed then it's bitching.
Comment 7 Denis Lukianov 2006-04-03 08:00:52 UTC
(In reply to comment #4)
> r1054: 1072 warnings with -Wall

what compiler/environment is this on?
Comment 8 Dean Joseph 2006-09-14 21:01:55 UTC
r1483 with -Wall

client: 16 warnings, debug
server: 5 warnings, debug console

mingw, win32
Comment 9 Mike Lightner 2006-11-06 22:04:07 UTC
r1962:

Server - 972
Client - 1109

mingw, win32, -Wall
Comment 10 Alexander Mayfield 2007-09-01 20:04:33 UTC
g++ -DUNIX -DLINUX -DNOASM -Icommon -g -Wall -O2 -I../server/src -Iserver/src -c common/farchive.cpp -o obj/common/server_farchive.o
common/farchive.cpp: In member function 
Comment 11 Alexander Mayfield 2007-09-01 20:06:37 UTC
hrm, that didn't paste right, here's a pastebin

http://odamex.net/pastebin/?page=view&id=1188695176
Comment 12 Dean Joseph 2007-10-03 00:53:21 UTC
Created attachment 74 [details]
GCC 4.2.1 warnings with r377
Comment 13 Denis Lukianov 2008-05-04 13:08:07 UTC
okay, i think we solved the major part of the warning mess for now. marking this bug fixed. if there are particularly noisy compilers in the future, please open a new bug.