Peter Samuelson wrote:
> [Daniel Näslund]
>
>> if (! original_value)
>> - header_fmt = _("Added: %s%s");
>> + SVN_ERR(file_printf_from_utf8(file, encoding, "Added: %s%s",
>> + propchange->name, APR_EOL_STR));
>>
>
> Julian talked about this code already, but just to point out: your
> change is incorrect, because it removes the _() functionality, i.e.,
> string localisation. You have to be careful about these things.
>
> ...Indeed, we use quite a lot of _() with printf format strings (see
> all the references to 'c-format' in tools/po/po-update.sh). Why
> aren't these _all_ warnings with your compiler?
>
Because his compiler is probably gcc, and gcc "sees" through gettext()
and friends; in other words, libintl.h declares the necessary function
attributes that allow gcc to make assumptions about the return values
based on function arguments.
-- Brane
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414863
Received on 2009-11-05 19:18:46 CET