svn commit: r252376 - head/lib/libutil

Tim Kientzle kientzle at FreeBSD.org
Sat Jun 29 16:36:14 UTC 2013


On Jun 29, 2013, at 9:19 AM, Konstantin Belousov wrote:

> On Sat, Jun 29, 2013 at 03:52:49PM +0000, Tim Kientzle wrote:
>> Author: kientzle
>> Date: Sat Jun 29 15:52:48 2013
>> New Revision: 252376
>> URL: http://svnweb.freebsd.org/changeset/base/252376
>> 
>> Log:
>>  Fix -Wunsequenced warning
> What is this ? From the name of the warning, it sounds as if the problem
> is in the lack of sequence point between two modifications of the same
> variable in the expression ?
> 
> But, there function' argument evaluation and function call are separated
> by seq point, AFAIR.  Could you, please, clarify ?

I think you're right about that, though I'd have to
look at the spec to be sure.

Not sure why clang would report this as a -Wunsequenced
warning.  The implied store here is certainly redundant, though.

Tim



>>  Submitted by:	dt71 at gmx.com
>> 
>> Modified:
>>  head/lib/libutil/login_times.c
>> 
>> Modified: head/lib/libutil/login_times.c
>> ==============================================================================
>> --- head/lib/libutil/login_times.c	Sat Jun 29 15:51:27 2013	(r252375)
>> +++ head/lib/libutil/login_times.c	Sat Jun 29 15:52:48 2013	(r252376)
>> @@ -96,7 +96,7 @@ parse_lt(const char *str)
>> 	else
>> 	    m.lt_start = 0;
>> 	if (*p == '-')
>> -	    p = parse_time(++p, &m.lt_end);
>> +	    p = parse_time(p + 1, &m.lt_end);
>> 	else
>> 	    m.lt_end = 1440;
>> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20130629/9c71d294/attachment.sig>


More information about the svn-src-all mailing list