Skip to content

Conversation

@hjmjohnson
Copy link
Member

A few compiler warnings found by the intel compiler.

@finetjul
Copy link
Member

Looks good to me, but someone else should approve.
For information, I still have warnings building with MSVC:

Warning 1 warning C4267: 'argument' : conversion from 'size_t' to 'unsigned long', possible loss of data f:\work\SlicerExecutionModel\SlicerExecutionModel\ModuleDescriptionParser\ModuleFactory.cxx 2077
Warning 2 warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data f:\work\SlicerExecutionModel\SlicerExecutionModel\ModuleDescriptionParser\ModuleFactory.cxx 2176
Warning 3 warning C4267: 'argument' : conversion from 'size_t' to 'unsigned long', possible loss of data f:\work\SlicerExecutionModel\SlicerExecutionModel\ModuleDescriptionParser\ModuleFactory.cxx 2184
Warning 4 warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data f:\work\SlicerExecutionModel\SlicerExecutionModel\ModuleDescriptionParser\ModuleDescriptionParser.cxx 1979
Warning 5 warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data f:\work\SlicerExecutionModel\SlicerExecutionModel\GenerateCLP\GenerateCLP.cxx 178
Warning 6 warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 474
Warning 7 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 541
Warning 8 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 546
Warning 9 warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 552
Warning 10 warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 560
Warning 11 warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 613
Warning 12 warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 639
Warning 13 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 641
Warning 14 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 673
Warning 15 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 679
Warning 16 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 686
Warning 17 warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 687
Warning 18 warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 688
Warning 19 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 766
Warning 20 warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 778
Warning 21 warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 833
Warning 22 warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 836
Warning 23 warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 837
Warning 24 warning C4996: 'putenv': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _putenv. See online help for details. F:\work\Slicer\Slicer4-Debug-64b\ITKv3-build\Utilities\itksys\SharedForward.h 841
Warning 25 warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data f:\work\SlicerExecutionModel\SlicerExecutionModel\GenerateCLP\Testing\Slicer3Example.cxx 5
Warning 26 warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data f:\work\SlicerExecutionModel\SlicerExecutionModel\GenerateCLP\Testing\PointExample1.cxx 5
Warning 27 warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data f:\work\SlicerExecutionModel\SlicerExecutionModel\GenerateCLP\Testing\CLPExample1.cxx 5

SlicerExecutionModel/tclap/include/tclap/CmdLine.h(297): remark #522: function "TCLAP::CmdLine::_constructor" redeclared "inline" after being called
SlicerExecutionModel/tclap/include/tclap/CmdLine.h(360): remark #522: function "TCLAP::CmdLine::add(TCLAP::Arg *)" redeclared "inline" after being called
SlicerExecutionModel/tclap/include/tclap/CmdLine.h(419): remark #522: function "TCLAP::CmdLine::_emptyCombined" redeclared "inline" after being called
SlicerExecutionModel/tclap/include/tclap/CmdLine.h(431): remark #522: function "TCLAP::CmdLine::deleteOnExit(TCLAP::Arg *)" redeclared "inline" after being called
SlicerExecutionModel/tclap/include/tclap/CmdLine.h(436): remark #522: function "TCLAP::CmdLine::deleteOnExit(TCLAP::Visitor *)" redeclared "inline" after being called

In addition several unused variable warnings were removed.
hjmjohnson added a commit that referenced this pull request Sep 11, 2012
Fix intel compiler warnings.  Rebased against 20120911 master repository.
@hjmjohnson hjmjohnson merged commit 674f0d9 into Slicer:master Sep 11, 2012
dzenanz added a commit that referenced this pull request May 30, 2024
Sample failure output:

2: Test command: C:\Misc\SlicerExecutionModel\bld22\ModuleDescriptionParser\bin\Debug\Parser1Test.exe "C:/Misc/SlicerExecutionModel/ModuleDescriptionParser/Testing/TestData/ParserTest2.xml"
2: Working Directory: C:/Misc/SlicerExecutionModel/bld22/ModuleDescriptionParser/Testing
2: Test timeout computed to be: 1500
2: not well-formed (invalid token) at line 111
1/2 Test #2: Parser1Test2 .....................***Failed    0.02 sec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants