supressing specific warnings

I am using the new GCC compiler 3.3.1.

It is flagging things as warning that it has never flagged before.
THIS IS GOOD! I like the compiler to help me with warnings.

But, . . . . I can’t seem to code away one warning in particular. So,
I need to supress it. Our code must compile without warnings. The
warning is:
callbacks.cc:188: warning: `%D’ yields only last 2 digits of year
on the lines:
static const char timeFormatString [] = “%a %b %D, %T”;
strftime( buffer, 32, timeFormatString, localtime( &prev_TOD ) );

I only want the last 2 digits. How do I make this warning go away?

Try " -Wno-format-y2k".

Murf

Bill Caroselli wrote:

I am using the new GCC compiler 3.3.1.

It is flagging things as warning that it has never flagged before.
THIS IS GOOD! I like the compiler to help me with warnings.

But, . . . . I can’t seem to code away one warning in particular. So,
I need to supress it. Our code must compile without warnings. The
warning is:
callbacks.cc:188: warning: `%D’ yields only last 2 digits of year
on the lines:
static const char timeFormatString [] = “%a %b %D, %T”;
strftime( buffer, 32, timeFormatString, localtime( &prev_TOD ) );

I only want the last 2 digits. How do I make this warning go away?