Bug 4840 - Warning when compiling on 64-bit (patch to fix included)
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Platform
Version: GIT MASTER
Hardware: All All
: P3 trivial
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2010-12-16 10:44 EST by jackmcbarn
Modified: 2011-02-04 09:20:17 EST
3 users (show)

See Also:


Attachments
Patch to fix (503 bytes, patch)
2010-12-16 10:44 EST, jackmcbarn
Patch to fix (659 bytes, patch)
2010-12-16 15:24 EST, jackmcbarn

Description jackmcbarn 2010-12-16 10:44:09 EST
Created attachment 2531 [details]
Patch to fix

When compiling 64-bit builds of ioquake3, the following warning is received:

code/tools/lcc/cpp/tokens.c: In function ‘peektokens’:
code/tools/lcc/cpp/tokens.c:270: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’

Attached is a patch to fix this by using %td (the format specifier for an integer that is the difference between pointers) rather than %d.
Comment 1 jackmcbarn 2010-12-16 15:24:46 EST
Created attachment 2533 [details]
Patch to fix

It was brought to my attention that my original patch did not work on MinGW.  I have attached a new patch that does.
Comment 2 Tim Angus 2010-12-19 13:26:46 EST
I'm pretty surprised this is the only 64 bit format related warning?
Comment 3 jackmcbarn 2010-12-20 16:18:14 EST
Yes, it's the only 64-bit-related warning.  I just checked out a fresh copy of trunk and ran "make all", and no other warnings related to 64-bit are given.
Comment 4 Thilo Schulz 2011-02-04 09:20:17 EST
fixed r1844