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:
Detlef Riekenberg authored and David Herrmann committed 2012-10-08 17:30:36 +02:00
1 parent 158b5fcbac
commit f92a445957
1 file changed
+2 -2
+2 -2
View File
@@ -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);
}
}