Please note that Edmund's revised patch for this is @;
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414562
(Which has also received no comments.)
Gavin.
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
>
>> Index: subversion/libsvn_delta/svndiff.c
>> ===================================================================
>> --- subversion/libsvn_delta/svndiff.c (revision 40372)
>> +++ subversion/libsvn_delta/svndiff.c (working copy)
>> @@ -190,7 +190,7 @@
>> /* Make sure we write the header. */
>> if (eb->header_done == FALSE)
>> {
>> - char svnver[4] = "SVN\0";
>> + char svnver[4] = {'S','V','N',0};
>> len = 4;
>> svnver[3] = eb->version;
>> SVN_ERR(svn_stream_write(eb->output, svnver, &len));
>
> 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.
>
> --
> Philip
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414466
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416309
Received on 2009-11-11 00:10:45 CET