From fa9e43fddee9d697250da059c40f5074c5cd5898 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 13 Jul 2017 11:04:45 +0200 Subject: [PATCH] Fix wrong data type in argument for sscanf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ccutil/unicharcompress.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccutil/unicharcompress.cpp b/ccutil/unicharcompress.cpp index 355b3f98a1..64b8f5782e 100644 --- a/ccutil/unicharcompress.cpp +++ b/ccutil/unicharcompress.cpp @@ -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) {