[Cmake-commits] [cmake-commits] david.cole committed cmHexFileConverter.cxx 1.8 1.9 cmSystemTools.cxx 1.403 1.404 cmakewizard.cxx 1.25 1.26
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Oct 2 15:30:03 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv14435/Source
Modified Files:
cmHexFileConverter.cxx cmSystemTools.cxx cmakewizard.cxx
Log Message:
Fix warnings in CMake source code.
Index: cmHexFileConverter.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmHexFileConverter.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** cmHexFileConverter.cxx 1 Oct 2009 20:47:08 -0000 1.8
--- cmHexFileConverter.cxx 2 Oct 2009 19:30:01 -0000 1.9
***************
*** 173,178 ****
}
! buf[0] = 0;
! (void) fgets(buf, 1024, inFile);
fclose(inFile);
FileType type = Binary;
--- 173,180 ----
}
! if(!fgets(buf, 1024, inFile))
! {
! buf[0] = 0;
! }
fclose(inFile);
FileType type = Binary;
Index: cmakewizard.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmakewizard.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -C 2 -d -r1.25 -r1.26
*** cmakewizard.cxx 1 Oct 2009 20:47:08 -0000 1.25
--- cmakewizard.cxx 2 Oct 2009 19:30:01 -0000 1.26
***************
*** 29,34 ****
printf("New Value (Enter to keep current value): ");
char buffer[4096];
! buffer[0] = 0;
! (void) fgets(buffer, sizeof(buffer)-1, stdin);
if(strlen(buffer) > 0)
--- 29,36 ----
printf("New Value (Enter to keep current value): ");
char buffer[4096];
! if(!fgets(buffer, sizeof(buffer)-1, stdin))
! {
! buffer[0] = 0;
! }
if(strlen(buffer) > 0)
***************
*** 66,71 ****
printf("Would you like to see advanced options? [No]:");
char buffer[4096];
! buffer[0] = 0;
! (void) fgets(buffer, sizeof(buffer)-1, stdin);
if(buffer[0])
{
--- 68,75 ----
printf("Would you like to see advanced options? [No]:");
char buffer[4096];
! if(!fgets(buffer, sizeof(buffer)-1, stdin))
! {
! buffer[0] = 0;
! }
if(buffer[0])
{
Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.403
retrieving revision 1.404
diff -C 2 -d -r1.403 -r1.404
*** cmSystemTools.cxx 1 Oct 2009 20:47:08 -0000 1.403
--- cmSystemTools.cxx 2 Oct 2009 19:30:01 -0000 1.404
***************
*** 916,921 ****
return false;
}
! buffer[0] = 0;
! (void) fgets(buffer, BUFFER_SIZE, cpipe);
while(!feof(cpipe))
{
--- 916,923 ----
return false;
}
! if (!fgets(buffer, BUFFER_SIZE, cpipe))
! {
! buffer[0] = 0;
! }
while(!feof(cpipe))
{
***************
*** 925,930 ****
}
output += buffer;
! buffer[0] = 0;
! (void) fgets(buffer, BUFFER_SIZE, cpipe);
}
--- 927,934 ----
}
output += buffer;
! if(!fgets(buffer, BUFFER_SIZE, cpipe))
! {
! buffer[0] = 0;
! }
}
More information about the Cmake-commits
mailing list