Bug 4812 - GCC __attribute__ annotations for printf, non-returning functions etc.
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: PC Linux
: P3 enhancement
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2010-12-03 11:58 EST by bugspam
Modified: 2011-07-18 10:57:32 EDT
3 users (show)

See Also:


Attachments
Add various __attribute__ annotations (10.14 KB, patch)
2010-12-03 12:12 EST, bugspam
Fixers various warnings, mostly shown up by the annotations patch. (10.95 KB, patch)
2010-12-03 12:35 EST, bugspam
Fixes various warnings, mostly shown up by the annotations patch (10.99 KB, patch)
2010-12-03 12:46 EST, bugspam
Adds more __attribute__ to ioq3 and fix most new warnings. (17.76 KB, patch)
2011-07-16 19:58 EDT, Zack Middleton
Adds more __attribute__ to ioq3 and fix most new warnings. (20.34 KB, patch)
2011-07-16 20:47 EDT, Zack Middleton

Description bugspam 2010-12-03 11:58:15 EST
This is to allow checking for format string errors etc.
Comment 1 bugspam 2010-12-03 12:12:01 EST
Created attachment 2499 [details]
Add various __attribute__ annotations
Comment 2 bugspam 2010-12-03 12:35:43 EST
Created attachment 2500 [details]
Fixers various warnings, mostly shown up by the annotations patch.
Comment 3 bugspam 2010-12-03 12:46:25 EST
Created attachment 2501 [details]
Fixes various warnings, mostly shown up by the annotations patch

%p is wrong; "nil" may occur (with glibc).
Comment 4 /dev/humancontroller 2011-05-23 17:33:41 EDT
copy to ioq3
Comment 5 Chris "Lakitu7" Schwarz 2011-06-10 20:40:51 EDT
This is an upstream thing. Moved upstream to ioquake3. You can speed this patch along by submitting a patch against IOQuake 3 SVN HEAD.
Comment 6 Thilo Schulz 2011-06-11 11:36:30 EDT
Yes, please create a patch that applies cleanly against ioq3.
Comment 7 Zack Middleton 2011-07-16 19:58:14 EDT
Created attachment 2838 [details]
Adds more __attribute__ to ioq3 and fix most new warnings.

Patch adds more GCC __attribute__ to ioq3. I fixed most of the new warnings, but it still gives warnings for two unused functions (Sys_Warn and PC_SourceWarning).
Comment 8 Zack Middleton 2011-07-16 20:47:34 EDT
Created attachment 2839 [details]
Adds more __attribute__ to ioq3 and fix most new warnings.

Added __attribute__ ((noreturn)) to Com_Error, CG_Error, G_Error, trap_Error, and displayContextDef_t::Error.
Comment 9 Zack Middleton 2011-07-18 04:25:44 EDT
Comment on attachment 2839 [details]
Adds more __attribute__ to ioq3 and fix most new warnings.

Com_Error can return in rare cases... Switching back to my original patch.
Comment 10 Zack Middleton 2011-07-18 04:26:05 EDT
Comment on attachment 2838 [details]
Adds more __attribute__ to ioq3 and fix most new warnings.

Un-obsolete my original patch.
Comment 11 Thilo Schulz 2011-07-18 10:57:32 EDT
applied r2090, thank you