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