forked from ~ljy/RK356X_SDK_RELEASE

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