View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015413CMakeCMakepublic2015-02-20 11:092015-07-08 08:57
ReporterPeter Wu 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 3.1.3 
Target VersionCMake 3.3Fixed in VersionCMake 3.3 
Summary0015413: CheckStructHasMember generates an uninitialized variable warning
DescriptionRelated to bug 15203 (which is fixed in CMake 3.2).

The current check_struct_has_member macro (as can be found in CMake 3.2) generates an uninitialized variable warning (noticeable via Clangs static code analyzer).

A patch was proposed in http://www.cmake.org/Bug/view.php?id=15203#c37979, [^] but a valid concern was raised about invoking C++ constructors. Here is a new minimal patch which uses sizeof instead.
TagsNo tags attached.
Attached Filespatch file icon 0001-CheckStructHasMember-fix-null-deref-warning.patch [^] (893 bytes) 2015-02-20 11:09 [Show Content]

 Relationships
related to 0015203closedBrad King CheckStructHasMember breaks on -Wunused-value 

  Notes
(0038010)
Brad King (manager)
2015-02-20 11:36

Applied, thanks:

 CheckStructHasMember: fix null deref warning
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1da4dc2 [^]
(0039059)
Robert Maynard (manager)
2015-07-08 08:57

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

 Issue History
Date Modified Username Field Change
2015-02-20 11:09 Peter Wu New Issue
2015-02-20 11:09 Peter Wu File Added: 0001-CheckStructHasMember-fix-null-deref-warning.patch
2015-02-20 11:21 Brad King Assigned To => Brad King
2015-02-20 11:21 Brad King Status new => assigned
2015-02-20 11:21 Brad King Target Version => CMake 3.3
2015-02-20 11:24 Brad King Relationship added related to 0015203
2015-02-20 11:36 Brad King Note Added: 0038010
2015-02-20 11:36 Brad King Status assigned => resolved
2015-02-20 11:36 Brad King Resolution open => fixed
2015-02-20 11:36 Brad King Fixed in Version => CMake 3.3
2015-07-08 08:57 Robert Maynard Note Added: 0039059
2015-07-08 08:57 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team