summaryrefslogtreecommitdiffstats
path: root/tests/loggingrb
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-11 19:33:10 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-11 19:33:10 +0200
commit6b1faf73628f3a8cc94a360600f1c4e6c76ca461 (patch)
treea58b9e8dff90626bb300423a2925ee592451d02a /tests/loggingrb
parentc2b4458e0789dcf42bd0fb7498d97c041aca87be (diff)
logginrb: Fix compiler warning about fprintf
loggingrb/loggingrb_test.c:76:18: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf(stderr, log_target_rb_get(ringbuf_target, 0)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ loggingrb/loggingrb_test.c:77:18: warning: format string is not a string literal (potentially insecure) [-Wformat-security] fprintf(stderr, log_target_rb_get(ringbuf_target, 1)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'tests/loggingrb')
-rw-r--r--tests/loggingrb/loggingrb_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/loggingrb/loggingrb_test.c b/tests/loggingrb/loggingrb_test.c
index ebc0181b..2e2c717b 100644
--- a/tests/loggingrb/loggingrb_test.c
+++ b/tests/loggingrb/loggingrb_test.c
@@ -73,8 +73,8 @@ int main(int argc, char **argv)
DEBUGP(DRLL, "You should see this\n");
DEBUGP(DCC, "You should see this\n");
DEBUGP(DMM, "You should not see this\n");
- fprintf(stderr, log_target_rb_get(ringbuf_target, 0));
- fprintf(stderr, log_target_rb_get(ringbuf_target, 1));
+ fprintf(stderr, "%s", log_target_rb_get(ringbuf_target, 0));
+ fprintf(stderr, "%s", log_target_rb_get(ringbuf_target, 1));
OSMO_ASSERT(!log_target_rb_get(ringbuf_target, 2));
return 0;