Skip to content

Commit fa9e43f

Browse files
committed
Fix wrong data type in argument for sscanf
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 <sw@weilnetz.de>
1 parent f527715 commit fa9e43f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ccutil/unicharcompress.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ static bool DecodeRadicalStrokeTable(STRING* radical_stroke_table,
7171
radical_stroke_table->split('\n', &lines);
7272
for (int i = 0; i < lines.size(); ++i) {
7373
if (lines[i].length() == 0 || lines[i][0] == '#') continue;
74-
int unicode, radical, strokes;
74+
unsigned unicode;
75+
int radical, strokes;
7576
STRING str_radical;
7677
if (sscanf(lines[i].string(), "%x\t%d.%d", &unicode, &radical, &strokes) ==
7778
3) {

0 commit comments

Comments
 (0)