Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From b08e61ef64eece23ce8ffa2784cd3c4f70b6169e Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 17 Jun 2017 08:08:56 -0700 |
| 4 | Subject: [PATCH] Specify printf formats |
| 5 | |
| 6 | Fixes |
| 7 | tiotest.c:555:4: error: format not a string literal and no format arguments [-Werror=format-security] |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | --- |
| 13 | tiotest.c | 6 +++--- |
| 14 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 15 | |
| 16 | diff --git a/tiotest.c b/tiotest.c |
| 17 | index 6b3d0c3..3e6166a 100644 |
| 18 | --- a/tiotest.c |
| 19 | +++ b/tiotest.c |
| 20 | @@ -91,7 +91,7 @@ inline void checkIntZero(int value, char *mess) |
| 21 | { |
| 22 | if (value <= 0) |
| 23 | { |
| 24 | - printf(mess); |
| 25 | + printf("%s",mess); |
| 26 | printf("Try 'tiotest -h' for more information.\n"); |
| 27 | exit(1); |
| 28 | } |
| 29 | @@ -101,7 +101,7 @@ inline void checkLong(long value, char *mess) |
| 30 | { |
| 31 | if (value < 0) |
| 32 | { |
| 33 | - printf(mess); |
| 34 | + printf("%s", mess); |
| 35 | printf("Try 'tiotest -h' for more information\n"); |
| 36 | exit(1); |
| 37 | } |
| 38 | @@ -552,7 +552,7 @@ void do_test( ThreadTest *test, int testCase, int sequential, |
| 39 | if(args.debugLevel > 4) |
| 40 | { |
| 41 | printf("Created %d threads\n", i); |
| 42 | - fprintf(stderr, debugMessage); |
| 43 | + fprintf(stderr, "%s", debugMessage); |
| 44 | fflush(stderr); |
| 45 | } |
| 46 | |
| 47 | -- |
| 48 | 2.13.1 |
| 49 | |