[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: Thu, 22 Nov 2012 18:24:44 +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.

I do believe this is the case for static initializers, which these are
not? Surely gcc in -ansi -Wall mode would warn about that ... looking ...

[5 minutes later]

Sigh. You're right, and it takes -pedanticto get gcc to issue a warning.
Will fix.

-- Brane

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Received on 2012-11-22 18:25:22 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.