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

Re: [PATCH] Remove 'svnver' array warning in svndiff.c when

From: Gavin Baumanis <gavinb_at_thespidernet.com>
Date: Wed, 11 Nov 2009 12:41:17 +1100

Thanks Julian.

On 11/11/2009, at 11:43 , Julian Foad wrote:

> Gavin Baumanis wrote:
>> Please note that Edmund's revised patch for this is @;
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414562
>
> I have now committed this in r40447. I tweaked it to use '\0' instead of
> 0 to be sure of not getting any "shortening the integer to 8 bits" or
> signed/unsigned type mismatch kind of warnings.
>
> - Julian
>
>
>> On 05/11/2009, at 04:09 , Philip Martin wrote:
>>> Edmund Wong <ed_at_kdtc.net> writes:
>>>
>>>> During a Windows compile under VS2008, the following warning is
>>>> shown:
>>>>
>>>> ..\..\..\subversion\libsvn_delta\svndiff.c(193): warning C4295:
>>>> 'svnver' : array is too small to include a terminating null
>>>> character
>
>>>> - char svnver[4] = "SVN\0";
>>>> + char svnver[4] = {'S','V','N',0};
>
>>> The old code is valid C as I think you know. It's a slightly
>>> obscure
>>> corner of the language; perhaps we should use {'S', 'V', 'N', '-'}
>>> to
>>> indicate that it is not a null terminated string.
>
>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416344
Received on 2009-11-11 02:41:36 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.