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

Re: [PATCH] fix potentially undefined operation warning

From: Andreas Stieger <andreas.stieger_at_gmx.de>
Date: Fri, 16 May 2014 18:24:18 +0100

Hi,

> On 15 May 2014, at 15:49, Branko ÄŒibej <brane_at_wandisco.com> wrote:
>
> Good catch, the result of these operations is indeed undefined, according to the C standard.
> However, I don't know if your fix is correct ... the other interpretation is:
>
> foo(&data, data + 1);
> ++data;
>
> The author of this code should have a look and decide which interpretation he meant.

I think he has. Further, the call is to svn__base36toui64() which, if I read correctly, uses the pointer as a return, e.g. in this case it does not matter whether the first parameter was incremented. Never versions of gcc might detect this and not warn?

Andreas
Received on 2014-05-16 20:14:04 CEST

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.