svn commit: r247960 - head/cddl/contrib/opensolaris/tools/ctf/cvt

Dimitry Andric dim at FreeBSD.org
Thu Mar 7 23:00:53 UTC 2013


On 2013-03-07 23:29, Andriy Gapon wrote:
...
> I was not really kidding when I said that this change, as is, is a nop:
...
>> +			bname = strrchr(match.iim_name, '/');
>> +			bname = bname == NULL ? match.iim_name : bname + 1;
>
> It would probably make sense to make use of bname after going to through all the
> trouble of calculating it:
>
>>   			match.iim_file = match.iim_name;
>
> Should be match.iim_file = bname ?

Yes, I actually had this in my test code, and committed the wrong diff
by accident. :(  Fixed in r247962, in any case.


> Surprised that clang hasn't warned you about this one :-)

Clang currently does not have the -Wunused-but-set-variable warning; it
is apparently available in the static analyzer.  On the other hand, that
warning is one of the most annoying ones that newer gcc's have. :-)


More information about the svn-src-all mailing list