Browse Source

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.
Brad King 16 years ago
parent
commit
ca95b339fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/cmFileCommand.cxx

+ 1 - 1
Source/cmFileCommand.cxx

@@ -535,7 +535,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
   // with some extra characters in strings.
   char extra[256]; // = {}; // some compilers do not like this
   memset(extra, 0, sizeof(extra));
-  extra['\f'] = 1; // FF  (form feed)
+  extra[0x0c] = 1; // FF  (form feed)
   extra[0x14] = 1; // DC4 (device control 4)
 
   // Parse strings out of the file.