Hi,
Scanning the translations template file fails due to APR_UINT64_T_FMT
being used as is in format strings. This is from r1575628 (fsfs l2p
index), also from log-addressing branch, and r1595579 (sync of same to
FSX). While this works at execution time (modulo actually translating),
xgettext cannot handle that:
> make locale-gnu-pot
> Building subversion.pot...
> ../libsvn_fs_fs/index.c:597: warning: Although being used in a format string position, the msgid is not a valid C format string. Reason: The string ends in the middle of a directive.
> ../libsvn_fs_fs/index.c:657: warning: Although being used in a format string position, the msgid is not a valid C format string. Reason: The string ends in the middle of a directive.
> ../libsvn_fs_fs/cached_data.c:944: warning: Although being used in a format string position, the msgid is not a valid C format string. Reason: The string ends in the middle of a directive.
etc.
Please review the attached patch. It basically wraps the
APR_UINT64_T_FMT into a call to apr_psprintf. The introduction of a pool
parameter to some private functions seems necessary.
[[[
Fix xgettext warnings and incomplete format strings due to macros
* subversion/libsvn_fs_fs/cached_data.c
(svn_fs_fs__check_rep): make xgettext friendly by printing the
format string macro separately
* subversion/libsvn_fs_x/cached_data.c
(svn_fs_x__check_rep): same
* subversion/libsvn_fs_fs/index.c
(svn_fs_fs__l2p_index_create): same x2
(l2p_page_info_copy,l2p_page_get_entry): same, and grow pool
parameters to support it
(l2p_page_info_access_func,get_l2p_page_info): update calls to
l2p_page_info_copy to pass a pool
(l2p_entry_access_func,l2p_index_lookup): update calls to
l2p_page_get_entry to pass a pool
* subversion/libsvn_fs_x/index.c
(svn_fs_x__l2p_index_create): make xgettext friendly by printing
the format string macro separately
(l2p_header_copy): same, and grow a pool parameter to support it
(l2p_header_access_func,get_l2p_page_info): update calls to
l2p_header_copy to pass a pool
]]]
With kind regards,
Andreas Stieger
Received on 2014-06-01 00:01:05 CEST