summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a1746ab)
Using format specifiers without arguments in printf is still bad.
openbox/debug.c:105:18: warning: format string is not a string literal (potentially insecure)
fprintf(out, log_domain);
^~~~~~~~~~
openbox/debug.c:107:18: warning: format string is not a string literal (potentially insecure)
fprintf(out, level);
^~~~~
openbox/debug.c:109:18: warning: format string is not a string literal (potentially insecure)
fprintf(out, message);
^~~~~~~
static inline void log_print(FILE *out, const gchar* log_domain,
const gchar *level, const gchar *message)
{
static inline void log_print(FILE *out, const gchar* log_domain,
const gchar *level, const gchar *message)
{
- fprintf(out, log_domain);
+ fprintf(out, "%s", log_domain);
+ fprintf(out, "%s", level);
+ fprintf(out, "%s", message);
fprintf(out, "\n");
fflush(out);
}
fprintf(out, "\n");
fflush(out);
}