View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011681CMakeDevelopmentpublic2011-01-11 07:122011-01-11 09:07
ReporterMarkus Elfring 
Assigned ToBrad King 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product VersionCMake 2.8.3 
Target VersionFixed in Version 
Summary0011681: Check return codes everywhere
DescriptionSome checks for return codes are missing.

Examples:
Would you like to add more error handling for return values from "fseek" like in the member function "SystemTools::FileHasSignature" and from "fprintf" in the function "cmCoreTryCompile::TryCompileCode"?
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/kwsys/SystemTools.cxx;hb=6754b26bf0bb69ad6d65249bf4122dbbda446922#l3566 [^]
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmCoreTryCompile.cxx;hb=72ebd4ee12fc99b5302c18619f120bd9c285b474#l172 [^]
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0024572)
Markus Elfring (reporter)
2011-01-11 07:50

I suggest to avoid unchecked function calls.
Would you like to detect every error situation as early as possible?

I guess that further code reviews will be needed for potential issues from unused return values like it happens with calls for the functions "read" and "write" in your function "kwsysProcessesSignalHandler".
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/kwsys/ProcessUNIX.c;hb=b9e3c243d476efa04479d253cfc4f76ecbdb6fe3#l2713 [^]
(0024577)
Brad King (manager)
2011-01-11 09:07

The issue tracker is not a good place to perform code review. Every real-world project has plenty of places that the code can be improved. Yes, there are cases where subtle failures can occur in obscure cases. Most will probably go unfixed until they cause a specific problem in practice, or a volunteer steps forward with ***actual patches to contribute***.

See also 0011683:0024576.

 Issue History
Date Modified Username Field Change
2011-01-11 07:12 Markus Elfring New Issue
2011-01-11 07:50 Markus Elfring Note Added: 0024572
2011-01-11 09:07 Brad King Note Added: 0024577
2011-01-11 09:07 Brad King Status new => closed
2011-01-11 09:07 Brad King Assigned To => Brad King
2011-01-11 09:07 Brad King Resolution open => no change required


Copyright © 2000 - 2018 MantisBT Team