project-navigation
Personal tools

Author Topic: codeblocks compile warnings  (Read 4130 times)

Offline noob

  • Rookie
  • ***
  • Posts: 59
  • http://tinyurl.com/68elb57 >>x-com style models<<
    • View Profile
codeblocks compile warnings
« on: October 28, 2011, 10:55:13 pm »
Quote
||=== ufo, windows ===|
C:\Games\UFOAI\src\client\battlescape\..\renderer\r_image.h|111|warning: 'libintl_printf' is an unrecognized format function type|
C:\Games\UFOAI\src\client\battlescape\..\cgame\cgame.h|91|warning: 'libintl_printf' is an unrecognized format function type|
C:\Games\UFOAI\src\client\battlescape\..\cgame\cgame.h|152|warning: 'libintl_printf' is an unrecognized format function type|
C:\Games\UFOAI\src\client\battlescape\..\cgame\cgame.h|153|warning: 'libintl_printf' is an unrecognized format function type|
C:\Games\UFOAI\src\client\battlescape\..\cgame\cgame.h|188|warning: 'libintl_printf' is an unrecognized format function type|
C:\Games\UFOAI\src\client\battlescape\..\cgame\cgame.h|213|warning: 'libintl_printf' is an unrecognized format function type|
C:\Games\UFOAI\src\client\battlescape\..\cgame\cgame.h|217|warning: 'libintl_printf' is an unrecognized format function type|
C:\Games\UFOAI\src\client\battlescape\..\cgame\cgame.h|218|warning: 'libintl_printf' is an unrecognized format function type|
C:\Games\UFOAI\src\client\battlescape\..\cgame\cgame.h|219|warning: 'libintl_printf' is an unrecognized format function type|
etc
its ok or something wrong with codeblocks 10.05?

« Last Edit: October 28, 2011, 10:56:45 pm by noob »

Offline AndyZCS

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
Re: codeblocks compile warnings
« Reply #1 on: October 21, 2012, 05:29:46 pm »

In various header files used by UFO & UFO_TESTALL there are uses of
'__attribute__((format(printf' to enable the compiler to perform additional checks.
Changing this to '__attribute__((format(__printf__' stops the preprocessor from causing the warning in the C::B environment.

Ref: http://docs.freebsd.org/info/gcc/gcc.info.Function_Attributes.html

"   You may also specify attributes with `__' preceding and following
each keyword.  This allows you to use them in header files without
being concerned about a possible macro of the same name.  For example,
you may use `__noreturn__' instead of `noreturn'."

I have had this working on my local copy for a few months & haven't seen any side effects in C::B

Regards
   Andy


Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: codeblocks compile warnings
« Reply #2 on: October 21, 2012, 09:01:55 pm »
thanks a lot Andy - this is applied to master now