[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1412554 - in /subversion/trunk/subversion: include/private/svn_string_private.h libsvn_subr/string.c tests/libsvn_subr/string-test.c

From: Branko Čibej <brane_at_wandisco.com>
Date: Fri, 23 Nov 2012 10:30:17 +0100

On 22.11.2012 17:22, Julian Foad wrote:
>> Author: brane
>> Date: Thu Nov 22 14:00:48 2012
>> New Revision: 1412554
>> Modified: subversion/trunk/subversion/libsvn_subr/string.c
>> svn_cstring__similarity(const char *stra, const char *strb,
>> svn_membuf_t *buffer, apr_size_t *rlcs)
>> {
>> - const apr_size_t lena = strlen(stra);
>> - const apr_size_t lenb = strlen(strb);
>> + const svn_string_t stringa = {stra, strlen(stra)};
>> + const svn_string_t stringb = {strb, strlen(strb)};
> Unfortunately our C'89 coding standard doesn't allow us to use non-constant initializers, and there are some compilers occasionally used to build Subversion that don't accept it.

Heh, by the way:

subversion/libsvn_fs_fs/fs_fs.c: In function 'get_cached_node_revision_body':
subversion/libsvn_fs_fs/fs_fs.c:2241: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c:2242: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c: In function 'set_cached_node_revision_body':
subversion/libsvn_fs_fs/fs_fs.c:2268: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c:2269: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c: In function 'parse_revprop':
subversion/libsvn_fs_fs/fs_fs.c:3532: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c:3532: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c: In function 'get_revision_proplist':
subversion/libsvn_fs_fs/fs_fs.c:3834: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c: In function 'read_representation':
subversion/libsvn_fs_fs/fs_fs.c:5186: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c:5186: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c: In function 'svn_fs_fs__try_process_file_contents':
subversion/libsvn_fs_fs/fs_fs.c:5358: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c:5358: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c:5363: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c:5363: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c: In function 'svn_fs_fs__get_proplist':
subversion/libsvn_fs_fs/fs_fs.c:5662: warning: initializer element is not computable at load time
subversion/libsvn_fs_fs/fs_fs.c:5662: warning: initializer element is not computable at load time

subversion/libsvn_repos/reporter.c: In function 'delta_files':
subversion/libsvn_repos/reporter.c:721: warning: initializer element is not computable at load time
subversion/libsvn_repos/reporter.c:722: warning: initializer element is not computable at load time
subversion/libsvn_repos/reporter.c:723: warning: initializer element is not computable at load time

tools/server-side/fsfs-reorg.c: In function 'update_text':
tools/server-side/fsfs-reorg.c:2472: warning: initializer element is not computable at load time

tools/client-side/svn-bench/null-log-cmd.c: In function 'svn_cl__null_log':
tools/client-side/svn-bench/null-log-cmd.c:137: warning: initializer element is not computable at load time

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Received on 2012-11-23 10:31:01 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.