View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015066CMakeCTestpublic2014-08-06 17:582015-01-05 08:39
ReporterKen Moreland 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformWindowsOSOS Version
Product VersionCMake 3.0 
Target VersionCMake 3.1Fixed in VersionCMake 3.1 
Summary0015066: MSVC level 3 warning in test code
DescriptionI like to compile my code in MSVC with level 3 warnings on (/W3 compiler flag), but this causes problems with code generated with the create_test_sourcelist() command. (That is, the code in TestDriver.cxx.in.) This code uses the functions strcpy and scanf, and the MSVC compiler gives an error for using each of them because each are notorious for leading to security problems.

Although the use of each of these is correct, TestDriver.cxx.in should be changed to suppress the warning in some way. Either the code should use "safe" alternatives for these functions or the warning should be disabled with something like "#pragma warning(disable : 4996)".
TagsNo tags attached.
Attached Filespatch file icon 0001-create_test_sourcelist-Suppress-MSVC-warnings-in-tes.patch [^] (816 bytes) 2014-08-07 09:16 [Show Content]

 Relationships

  Notes
(0036573)
Brad King (manager)
2014-08-07 09:17

Please try "0001-create_test_sourcelist-Suppress-MSVC-warnings-in-tes.patch".
(0036607)
Ken Moreland (reporter)
2014-08-12 15:45

The patch is working for me.
(0036608)
Brad King (manager)
2014-08-12 15:51

Thanks for testing. Applied:

 create_test_sourcelist: Suppress MSVC warnings in test driver
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63fc8dcd [^]
(0037613)
Robert Maynard (manager)
2015-01-05 08:39

Closing resolved issues that have not been updated in more than 4 months

 Issue History
Date Modified Username Field Change
2014-08-06 17:58 Ken Moreland New Issue
2014-08-07 09:16 Brad King File Added: 0001-create_test_sourcelist-Suppress-MSVC-warnings-in-tes.patch
2014-08-07 09:17 Brad King Note Added: 0036573
2014-08-07 09:17 Brad King Assigned To => Brad King
2014-08-07 09:17 Brad King Status new => assigned
2014-08-07 09:17 Brad King Target Version => CMake 3.1
2014-08-12 15:45 Ken Moreland Note Added: 0036607
2014-08-12 15:51 Brad King Note Added: 0036608
2014-08-18 11:12 Brad King Status assigned => resolved
2014-08-18 11:12 Brad King Resolution open => fixed
2014-08-18 11:12 Brad King Fixed in Version => CMake 3.1
2015-01-05 08:39 Robert Maynard Note Added: 0037613
2015-01-05 08:39 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team