Opened 14 years ago

Closed 12 years ago

#1 closed enhancement (fixed)

Compiler Warning & Information Messages

Reported by: ydario Owned by: rlwalsh
Priority: major Milestone: compiler switch
Component: odin Version:
Severity: medium Keywords:
Cc: rlwalsh

Description

rwalsh: I consider *every* message that the compiler generates to be a problem. If nothing else, having thousands of "harmless" messages makes it nearly impossible to find and fix the few that are actually telling you something important.

Eliminating all these messages is unbelievably boring & time- consuming, but essential, IMHO. So far, I've eliminated nearly all messages when compiling these directories:

advapi32, crypt32, kernel32, ntdll, user32, and winmm

There are two info messages that can't be eliminated because of the odd way that debug printf()'s are turned off (i.e. "the condition is always TRUE" & "the condition is always FALSE"). For these, I'm just using sed to filter them from the output:

nmake 2>&1 | sed -u /EDC042[45]/D | tee build.log

Change History (6)

comment:1 Changed 14 years ago by ydario

Owner: changed from rwalsh to rlwalsh

comment:2 Changed 14 years ago by rlwalsh

Cc: rlwalsh added

Committed changes to these directories:

include 21352 src/advapi32 21353 src/crypt32 21354 src/kernel32 21355 src/user32 21356 src/NTDLL 21357

Most of these changes involved adding typecasts to assignments & arguments, including missing headers, and making statements like "if ((x = GetX()))" explicitly conditional, i.e. "if ((x = GetX()) != 0)". Doing so eliminated these messages:

VACPP 3.65

warning EDC0068: Operation between types "[type]" and "[type]" is not allowed. warning EDC0196: Initialization between types "[type]" and "[type]" is not allowed. warning EDC0226: The ":" operator is not allowed between "[type]" and "[type]". warning EDC0236: Macro name [name] has been redefined. warning EDC0280: Function argument assignment between types "[type]" and "[type]" is not allowed. warning EDC0304: No function prototype given for [function].

informational EDC0423: The comparison may be rewritten as 'unsigned == 0'. informational EDC0426: An assignment expression is used as a condition.

informational EDC3107: Assignment in logical expression. informational EDC3130: A constant is being used as a conditional expression.

warning EDC3331: Return value of type "[type]" is expected.

informational EDC3378: "[name]" is defined on line [number] of "[filename]".

warning EDC3522: The macro "[name]" has been redefined.

GCC 3.3.5

warning: missing braces around initializer warning: no newline at end of file warning: `[variable]' defined but not used warning: unused variable `[variable]' warning: dereferencing type-punned pointer will break strict-aliasing rules warning: redefinition of `[type]' warning: `return' with a value, in function returning void warning: implicit declaration of function `[function'

comment:3 Changed 14 years ago by rlwalsh

Yikes! My formatting for the previous comment got all messed up. Here are the changesets again:

include 21352
src/advapi32 21353
src/crypt32 21354
src/kernel32 21355
src/user32 21356
src/NTDLL 21357

comment:4 Changed 13 years ago by Silvan Scherrer

Milestone: compiler switch

comment:5 Changed 12 years ago by Silvan Scherrer

Severity: medium

comment:6 Changed 12 years ago by dmik

Resolution: fixed
Status: newclosed

Since we moved to GCC, there are no warnings any longer (I fixed a lot of them during the compiler switch stage). Any future warnings are to be fixed in the source code.

Note: See TracTickets for help on using tickets.