r246646 - Silence a -Wsign-compare warning; NFC.

Daniel Marjamäki via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 20:55:53 PDT 2015


Hello!

In general I am scared of such fixes.

I assume we know that Info::MaxTables is never a negative value now. However if it would (by mistake) get a negative value in the future then you are hiding an important TP warning here.

I assume we know that Info::MaxTables is never larger than int since you casted to unsigned. However if it would (by mistake) get a large value and there is loss of precision we wont know it because the TP warnings are hidden.

In my opinion, hiding -Wsign-compare FP warnings makes the code weaker.

Best regards,
Daniel Marjamäki

..................................................................................................................
Daniel Marjamäki Senior Engineer
Evidente ES East AB  Warfvinges väg 34  SE-112 51 Stockholm  Sweden

Mobile:                 +46 (0)709 12 42 62
E-mail:                 Daniel.Marjamaki<mailto:Daniel.Marjamaki at evidente.se>@evidente.se<mailto:Daniel.Marjamaki at evidente.se>

www.evidente.se
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150903/cd095f8b/attachment.html>


More information about the cfe-commits mailing list