[Insight-developers] Warnings when building ITK with MSVC

Bradley Lowekamp blowekamp at mail.nih.gov
Mon Sep 17 10:25:05 EDT 2012


David,

The windows dashboards are not setup with the Wall flag.

The logic for the default warning flags can be found in the ITKSetStandardCompilerFlags.cmake. It's well documented on the reason for the selection of the warning levels chosen.

https://github.com/Kitware/ITK/blob/master/CMake/ITKSetStandardCompilerFlags.cmake

The general practice has been to add additional warning flags one by one. The takes a large effort upfront and a following large effort to clear additional warning from the dashboard.

Contributions to additional warning fixes are appreciated.

Brad

On Sep 16, 2012, at 9:50 AM, David Doria <daviddoria at gmail.com> wrote:

> When I build ITK with the MSVC 2010 compiler with -Wall added to
> CMAKE_CXX_FLAGS, I get hundreds (533) of warnings. I have pasted some
> representatives below:
> 
> ----------------------
> C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\malloc.h:241:
> warning: C4548: expression before comma has no effect; expected
> expression with side-effect
> 
> C:\src\ITK\Modules\ThirdParty\DICOMParser\src\DICOMParser\DICOMParser.cxx:628:
> warning: C4242: 'initializing' : conversion from 'int' to 'char',
> possible loss of data
> 
> c:\src\itk\modules\thirdparty\gdcm\src\gdcm\source\common\gdcmmd5.cxx:70:
> warning: C4702: unreachable code
> 
> C:\src\ITK\Modules\ThirdParty\KWSys\src\KWSys\SystemTools.cxx:208:
> warning: C4242: '=' : conversion from 'int' to 'char', possible loss
> of data
> 
> c:\src\itk\modules\thirdparty\metaio\src\metaio\metaUtils.h:43:
> warning: C4619: #pragma warning : there is no warning number '4284'
> ----------------------
> 
> I don't see these warnings show up on any of the MSVC dashboards - are
> there some flags or something that I have to pass to avoid/suppress
> these? Or are the dashboards just not built with -Wall?
> 
> David
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list