[Insight-developers] A massive number of new warnings

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Jan 7 09:30:01 EST 2011


Luis,

Isn't UINT(-1) a short hand for the max unsigned int? Isn't this behavior well defined by the C++ standard? Could the only thing wrong with the code be there is just an implicit case, and not an explicit one? You may have changed what the code was doing.

Brad


On Jan 7, 2011, at 8:58 AM, Luis Ibanez wrote:

> Brad,
> 
> I'm all for treating Warnings as errors,
> and agree with Dave's point that it is the way to
> prevent them from being dismissed by developers.
> 
> In many cases they are hinting us to locate real errors.
> 
> For example, in this patch:
> 
> http://review.source.kitware.com/#change,679
> 
> The warnings in openjpeg were revealing bugs in the
> API of many functions.
> 
> In particular, functions whose return type is declared
> as UINT32, and the code of the implementations return
> "-1", and code down the line compares against "-1".
> 
> http://review.source.kitware.com/#patch,sidebyside,679,1,Utilities/openjpeg/openjpeg.c
> 
> Those are real bugs,
> that were hinted by warnings.
> 
> 
>      Luis
> 

========================================================
Bradley Lowekamp  
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110107/289e53df/attachment.htm>


More information about the Insight-developers mailing list