Skip to content

Commit

Permalink
Fix wrong data type in argument for sscanf
Browse files Browse the repository at this point in the history
Compiler warning:

    ccutil/unicharcompress.cpp:76:76: warning: format ‘%x’ expects argument of type ‘unsigned int*’, but argument 3 has type ‘int*’ [-Wformat=]
    ccutil/unicharcompress.cpp:80:31: warning: format ‘%x’ expects argument of type ‘unsigned int*’, but argument 3 has type ‘int*’ [-Wformat=]

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jul 15, 2017
1 parent f527715 commit fa9e43f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ccutil/unicharcompress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ static bool DecodeRadicalStrokeTable(STRING* radical_stroke_table,
radical_stroke_table->split('\n', &lines);
for (int i = 0; i < lines.size(); ++i) {
if (lines[i].length() == 0 || lines[i][0] == '#') continue;
int unicode, radical, strokes;
unsigned unicode;
int radical, strokes;
STRING str_radical;
if (sscanf(lines[i].string(), "%x\t%d.%d", &unicode, &radical, &strokes) ==
3) {
Expand Down

0 comments on commit fa9e43f

Please sign in to comment.