Now don’t get me wrong, I love to use GNU make on all the unixoid platforms where I have to use it and I have been using it for some advanced stuff on Windows as well. But honestly, when has someone tried to compile this on Windows the last time? And moreover has anyone noticed the abundance of warnings?
Guess not. And I was merely trying to create a binary for myself and others who’d want to download it. I didn’t realize it was going to be such a PITA.
Implicit conversions between time_t
and int
or char
and int
all over the place, assumptions about the signedness of size_t
and the like. What’s annoying about particularly the latter one is that a consistent use of size_t
would avoid these warnings.
Oh, and has anyone by any chance noticed the horrible mix of tabs and spaces? What’s the default tab-width the author(s) are using? Is there even one?
Not to mention the hackery concerning time_t
w.r.t. 64-bit 🙄 …
After looking at the source code I have my doubts whether it is a good choice to use this, despite all the wicked-cool features GNU make has compared to other Make flavors. Even in much bigger code bases I’ve seen my share of warnings across the many supported compilers, but not quite as extensively as in this case.
All of this reminds me of code I sometimes see from a programmer who learned his skills in the 1980s but hasn’t really kept up … 😐
// Oliver
Exhibit A (using the GNU make 3.82 code with VS 2010):
warning C4244:
'=' : conversion from 'int' to 'char', possible loss of data commands.c 435
warning C4244:
'=' : conversion from 'time_t' to 'int', possible loss of data dir.c 499
warning C4244:
'=' : conversion from 'time_t' to 'int', possible loss of data dir.c 523
warning C4244:
'=' : conversion from 'time_t' to 'int', possible loss of data dir.c 524
warning C4244:
'=' : conversion from 'size_t' to 'short', possible loss of data dir.c 626
warning C4244:
'=' : conversion from 'time_t' to 'int', possible loss of data dir.c 647
warning C4244:
'=' : conversion from 'time_t' to 'int', possible loss of data dir.c 653
warning C4244:
'=' : conversion from 'unsigned int' to 'short', possible loss of data dir.c 700
warning C4244:
'=' : conversion from 'unsigned int' to 'short', possible loss of data dir.c 716
warning C4244:
'=' : conversion from 'size_t' to 'short', possible loss of data dir.c 885
warning C4244:
'=' : conversion from 'size_t' to 'short', possible loss of data dir.c 969
warning C4307:
'+' : integral constant overflow file.c 797
warning C4307:
'+' : integral constant overflow file.c 798
warning C4307:
'+' : integral constant overflow file.c 801
warning C4244:
'=' : conversion from 'int' to 'unsigned char', possible loss of data function.c 278
warning C4130:
'==' : logical operation on address of string constant function.c 528
warning C4130:
'==' : logical operation on address of string constant function.c 552
warning C4130:
'==' : logical operation on address of string constant function.c 585
warning C4130:
'==' : logical operation on address of string constant function.c 637
warning C4130:
'==' : logical operation on address of string constant function.c 922
warning C4244:
'=' : conversion from 'int' to 'char', possible loss of data function.c 1033
warning C4115:
'token' : named type definition in parentheses hash.c 46
warning C4115:
'token' : named type definition in parentheses hash.c 262
warning C4244:
'=' : conversion from 'int' to 'char', possible loss of data implicit.c 408
warning C4389:
'==' : signed/unsigned mismatch job.c 749
warning C4130:
'==' : logical operation on address of string constant main.c 1090
warning C4130:
'==' : logical operation on address of string constant main.c 1200
warning C4130:
'==' : logical operation on address of string constant main.c 1211
warning C4210:
nonstandard extension used : function given file scope main.c 1582
warning C4244:
'=' : conversion from 'const int' to 'char', possible loss of data main.c 2348
warning C4244:
'=' : conversion from 'const int' to 'char', possible loss of data main.c 2558
warning C4244:
'=' : conversion from 'const int' to 'char', possible loss of data main.c 2898
warning C4389:
'==' : signed/unsigned mismatch misc.c 207
warning C4130:
'==' : logical operation on address of string constant read.c 1960
warning C4130:
'==' : logical operation on address of string constant read.c 1965
warning C4245:
'return' : conversion from 'int' to 'unsigned long', signed/unsigned mismatch read.c 2320
warning C4210:
nonstandard extension used : function given file scope read.c 2855
warning C4307:
'+' : integral constant overflow remake.c 475
warning C4244:
'=' : conversion from 'int' to 'short', possible loss of data remake.c 665
warning C4244:
'=' : conversion from 'int' to 'short', possible loss of data remake.c 882
warning C4701:
potentially uninitialized local variable 'best_vpath' used remake.c 1601
warning C4701:
potentially uninitialized local variable 'best_path' used remake.c 1601
warning C4701:
potentially uninitialized local variable 'status' used main.c 2309
warning C4701:
potentially uninitialized local variable 'coredump' used job.c 787
warning C4701:
potentially uninitialized local variable 'exit_sig' used job.c 737
warning C4701:
potentially uninitialized local variable 'exit_code' used job.c 737
warning C4701:
potentially uninitialized local variable 'ri' used implicit.c 816
warning C4706:
assignment within conditional expression function.c 693
warning C4706:
assignment within conditional expression function.c 2238
warning C4706:
assignment within conditional expression function.c 2262
warning C4244:
'=' : conversion from 'int' to 'char', possible loss of data rule.c 384
warning C4244:
'=' : conversion from 'unsigned int' to 'unsigned short', possible loss of data rule.c 454
warning C4244:
'=' : conversion from 'int' to 'char', possible loss of data rule.c 469
warning C4244:
'=' : conversion from 'int' to 'char', possible loss of data signame.c 245
warning C4130:
'==' : logical operation on address of string constant variable.c 365
warning C4130:
'==' : logical operation on address of string constant variable.c 1016
warning C4130:
'==' : logical operation on address of string constant variable.c 1087
warning C4130:
'==' : logical operation on address of string constant variable.c 1284
warning C4090:
'function' : different 'const' qualifiers vpath.c 282
warning C4244:
'=' : conversion from 'int' to 'unsigned char', possible loss of data glob\fnmatch.c 177
warning C4244:
'=' : conversion from 'int' to 'unsigned char', possible loss of data glob\fnmatch.c 199
warning C4244:
'=' : conversion from 'int' to 'unsigned char', possible loss of data glob\fnmatch.c 274
warning C4244:
'initializing' : conversion from 'int' to 'unsigned char', possible loss of data glob\fnmatch.c 321
warning C4244:
'=' : conversion from 'int' to 'unsigned char', possible loss of data glob\fnmatch.c 327
warning C4389:
'!=' : signed/unsigned mismatch glob\glob.c 499
warning C4018:
'<' : signed/unsigned mismatch glob\glob.c 870
warning C4389:
'==' : signed/unsigned mismatch glob\glob.c 921
warning C4018:
'<' : signed/unsigned mismatch glob\glob.c 948
warning C4018:
'<' : signed/unsigned mismatch glob\glob.c 1010
warning C4018:
'<' : signed/unsigned mismatch glob\glob.c 1028
warning C4018:
'>' : signed/unsigned mismatch glob\glob.c 1051
warning C4018:
'<' : signed/unsigned mismatch glob\glob.c 1071
warning C4244:
'=' : conversion from 'int' to 'char', possible loss of data glob\glob.c 1155
warning C4706:
assignment within conditional expression w32\pathstuff.c 69
warning C4701:
potentially uninitialized local variable 'origin' used variable.c 1566