summaryrefslogtreecommitdiffstats
path: root/Source/cmHexFileConverter.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-10-02 19:30:01 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-10-02 19:30:01 (GMT)
commitccb0cf130673b55035106067997e9d135d4d27fa (patch)
treead0e4fe75d4036e576a6b2992a15baeb7c79fcb8 /Source/cmHexFileConverter.cxx
parent837364cb04a53a0fd3f5150da4f56524066fe2a7 (diff)
downloadCMake-ccb0cf130673b55035106067997e9d135d4d27fa.zip
CMake-ccb0cf130673b55035106067997e9d135d4d27fa.tar.gz
CMake-ccb0cf130673b55035106067997e9d135d4d27fa.tar.bz2
Fix warnings in CMake source code.
Diffstat (limited to 'Source/cmHexFileConverter.cxx')
-rw-r--r--Source/cmHexFileConverter.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx
index 91565b4..2ff7945 100644
--- a/Source/cmHexFileConverter.cxx
+++ b/Source/cmHexFileConverter.cxx
@@ -172,8 +172,10 @@ cmHexFileConverter::FileType cmHexFileConverter::DetermineFileType(
return Binary;
}
- buf[0] = 0;
- (void) fgets(buf, 1024, inFile);
+ if(!fgets(buf, 1024, inFile))
+ {
+ buf[0] = 0;
+ }
fclose(inFile);
FileType type = Binary;
unsigned int minLineLength = 0;