[Cmake-commits] [cmake-commits] king committed cmFileCommand.cxx 1.139 1.140

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Oct 6 17:51:37 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv23735/Source

Modified Files:
	cmFileCommand.cxx 
Log Message:
Use integer literal instead of character

The commit "Support more special characters in file(STRINGS)" added code
using a 'char' literal as an array index.  Some compilers warn about
this because char might be a signed type, leading to negative indices.
We replace the literal with an integer to avoid the warning.


Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.139
retrieving revision 1.140
diff -C 2 -d -r1.139 -r1.140
*** cmFileCommand.cxx	6 Oct 2009 20:33:15 -0000	1.139
--- cmFileCommand.cxx	6 Oct 2009 21:51:34 -0000	1.140
***************
*** 536,540 ****
    char extra[256]; // = {}; // some compilers do not like this
    memset(extra, 0, sizeof(extra));
!   extra['\f'] = 1; // FF  (form feed)
    extra[0x14] = 1; // DC4 (device control 4)
  
--- 536,540 ----
    char extra[256]; // = {}; // some compilers do not like this
    memset(extra, 0, sizeof(extra));
!   extra[0x0c] = 1; // FF  (form feed)
    extra[0x14] = 1; // DC4 (device control 4)
  



More information about the Cmake-commits mailing list