[Coin-discuss] OsiCuts warnings

Matthew Galati magh at lehigh.edu
Sun Nov 16 13:49:14 EST 2008


Leo - my company (SAS) follows the same rule. It is not silly at all!!

If there is a (very) strong reason that a developer disagrees with a 
warning -- add a pragma or define to shut them off.

Having 100s of warnings coming from COIN projects in my application 
makes it very difficult to find the "real" warnings that do require my 
attention. Not to mention, it makes my MONK come up -- a non-clean build 
log gives me hives.


> Dear Coin Folks,
>
> Just my generic 2c: In between degrees I worked for a financial
> software company. They required us to compile every project with
> "Treat Warnings as Errors". When I started I though that was silly,
> but over time I found that it was very valuable. It tends to promote
> good readable code and reduce the number of really difficult to squash
> bugs.
>
> Cheers,
> Leo.
>
> On Sun, Nov 16, 2008 at 8:47 AM, Matthew Galati <magh at lehigh.edu> wrote:
>   
>> Can someone please cleanup these warnings? These are easy ones.
>>
>> Thanks,
>> Matt
>>
>> int OsiCuts::sizeRowCuts() const { return rowCutPtrs_.size(); }
>> int OsiCuts::sizeColCuts() const { return colCutPtrs_.size(); }
>> int OsiCuts::sizeCuts()    const { return sizeRowCuts()+sizeColCuts(); }
>>
>> Warning    117    warning C4267: 'return' : conversion from 'size_t' to
>> 'int', possible loss of data
>>  c:\cygwin\home\magala\COIN\coin-Decomp\Osi\src\OsiCuts.hpp    376
>>
>>
>> _______________________________________________
>> Coin-discuss mailing list
>> Coin-discuss at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/coin-discuss
>>
>>     
>
>
>
>   





More information about the Coin-discuss mailing list