genunifont: avoid format-security compiler warning
Current warning without the patch: src/genunifont.c: In function 'print_data_row': src/genunifont.c:85:3: warning: format not a string literal and no format arguments [-Wformat-security] src/genunifont.c:88:3: warning: format not a string literal and no format arguments [-Wformat-security] We use fputs() to avoid any format-string parsing and instead directly write the string into the file. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
1 parent
158b5fcbac
commit
f92a445957
1 file changed
+2
-2
+2
-2
@@ -82,10 +82,10 @@ static void print_data_row(FILE *out, char c)
|
||||
|
||||
idx = hex_val(c);
|
||||
if (idx < 16) {
|
||||
fprintf(out, line_map[idx]);
|
||||
fputs(line_map[idx], out);
|
||||
} else {
|
||||
fprintf(stderr, "genunifont: invalid value %c\n", c);
|
||||
fprintf(out, line_map[0]);
|
||||
fputs(line_map[0], out);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user