View Issue Details

IDProjectCategoryView StatusLast Update
0005322unrealircdpublic2019-08-25 13:43
Reportersyzop Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version5.0.0-alpha1 
Fixed in Version5.0.0-alpha2 
Summary0005322: U5: make Windows compile without compiler warnings
DescriptionThe ultimate goal - during build tests - would be to have /W4 with /WX (which is -Werror).
For reference, the default warning level is /W1.

If it's too much hassle then we can settle for /W3 I suppose, but /W4 /WX would be the goal.

See also
to read why /W4 is a reachable target, and /Wall is not.
TagsNo tags attached.
3rd party modules


related to 0005320 resolvedsyzop U5: Windows 64 bit version 
child of 0005279 closedsyzop UnrealIRCd 5 master tracking issue 



2019-06-23 08:30

administrator   ~0020740

Also, you may want to switch to 64 bit first, as otherwise there's a slight change that you would end up fixing things that won't be there anymore.


2019-08-22 20:24

administrator   ~0020842

64 bit mostly done (ticket closed). I removed some warnings, added some more. Will look at this soon, if my spare time permits.


2019-08-23 17:40

administrator   ~0020843

Add SAL annotations for printf style code. Also add /ANALYZE but only for some warnings, eg only for printf + some perhaps.


2019-08-24 18:56

administrator   ~0020844

The printf warnings have been added and I believe I solved them all (buildbot may correct me if I'm wrong).

More warnings (other warnings..) will be fixed later.


2019-08-25 10:40

administrator   ~0020845

Temporarily turned /ANALYZE off for speed (compiling is really slow with it).

Ok, solved all warnings for /W1 now with last commit 6f884a6f60a8cc4ef59200dbedfa7d69ae520004 (but mostly the commits before it)

On to next level :D


2019-08-25 13:43

administrator   ~0020846

/W3 is done, and I'm happy enough with that.

These are my notes about warnings we ignore:

For /W3:
C4267: downgrade of size_t to int and such, pointless...
C4101: unreferenced local variable
C4018: signed/unsigned mismatch
C4244: implicit conversions with "possible loss of data".
       there are 75+ of them and they are likely all harmless (usually plain obvious too)
C4996: fixme! warnings about deprecated functions, currently only for GetVersion..
For /W4, additionally:
C4706: assignment in an if, like: if ((x = strchr(...
C4100: unreferenced parameter
C4189: unused local variable (that was initialized)
C4459: local variable shadowing global var
C4456: scope variable shadowing local var
...then i stopped...

/W4 could be doable but it's even firing warnings in system headers so... I don't know. I'm settling with W3 for now and since I don't think I'll revisit this anytime soon I'm closing the issue too.

So we compile with /W3 now and also with /WX to make it that warnings are errors (like -Werror)

Oh and /ANALYZE is on again for printf-validation. Iit was temporarily turned off during an earlier commit, while I was rebuilding a million times, since unfortunately /ANALYZE increases the compile time A LOT.

Issue History

Date Modified Username Field Change
2019-06-23 08:29 syzop New Issue
2019-06-23 08:30 syzop Note Added: 0020740
2019-06-23 09:04 syzop Relationship added child of 0005279
2019-08-18 15:17 syzop View Status private => public
2019-08-18 15:55 syzop Status new => acknowledged
2019-08-18 15:55 syzop Relationship added related to 0005320
2019-08-22 20:24 syzop Note Added: 0020842
2019-08-23 17:40 syzop Note Added: 0020843
2019-08-24 18:56 syzop Note Added: 0020844
2019-08-25 10:40 syzop Note Added: 0020845
2019-08-25 13:43 syzop Assigned To => syzop
2019-08-25 13:43 syzop Status acknowledged => resolved
2019-08-25 13:43 syzop Resolution open => fixed
2019-08-25 13:43 syzop Fixed in Version => 5.0.0-alpha2
2019-08-25 13:43 syzop Note Added: 0020846