Re: # flag used with printf warning
Re: # flag used with printf warning
- Subject: Re: # flag used with printf warning
- From: Jens Miltner <email@hidden>
- Date: Mon, 26 Apr 2004 23:52:40 +0200
Am 26.04.2004 um 23:25 schrieb Ricky Sharp:
I have several sprintf statments in the form:
sprintf( someNullTerminatedString, "some message %#s",
someLengthPrefixedString );
I get the following warning when compiling (this is a Carbon app):
'#' flag used with '%s' printf format
Is this just a warning that the code is less portable? Or, is it the
case where this is deprecated and should be avoided?
The "%#s" format specifier is a Metrowerks specific extension to the
printf format (actually, I think MPW might have supported it as well),
so I'd expect it to either not work when used with the BSD standard C
lib, or it might just stop working without further notice...
Did you try whether it works in the BSD libs? Even if it does today,
just don't rely on it to work in future releases...
</jum>
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.