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.
This commit is contained in:
Brad King 2009-10-06 17:51:34 -04:00
parent c6fdff2b22
commit ca95b339fb
1 changed files with 1 additions and 1 deletions

View File

@ -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.