Package: openmama / 2.2.2.1-10

0001-Fix-fprintf-format-strings.patch Patch series | download
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: Daniel Pocock <daniel@pocock.com.au>
Date: Fri, 9 Aug 2013 12:52:35 +0200
Subject: Fix fprintf format strings

---
 common/c_cpp/src/c/wMessageStats.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/c_cpp/src/c/wMessageStats.c b/common/c_cpp/src/c/wMessageStats.c
index b30a32c..5d1923a 100644
--- a/common/c_cpp/src/c/wMessageStats.c
+++ b/common/c_cpp/src/c/wMessageStats.c
@@ -272,7 +272,7 @@ int createStatisticsCache(statsCache** sCache,int numMsgCategories,
 
             if(mysCache->mHeader == 1 && mysCache->mOutfile == stdout)
             {
-                fprintf(mysCache->mOutfile,opHeaderPeriod);
+                fprintf(mysCache->mOutfile, "%s", opHeaderPeriod);
                 mysCache->mHeader=0;
             }
 
@@ -294,7 +294,7 @@ int createStatisticsCache(statsCache** sCache,int numMsgCategories,
         {
             if(mysCache->mHeader == 1 && mysCache->mOutfile == stdout)
             {
-                fprintf(mysCache->mOutfile,opHeaderPeriod);
+                fprintf(mysCache->mOutfile, "%s", opHeaderPeriod);
                 mysCache->mHeader=0;
             }
 
@@ -917,7 +917,7 @@ int printPerfData(perfData* pData,int headerFlag)
             if(headerFlag==1)
             {
                    /* print stats header every time for all symbols */
-                 fprintf(pData->mOutfile,opHeaderPeriod);
+                 fprintf(pData->mOutfile, "%s", opHeaderPeriod);
             }
             fprintf(pData->mOutfile," %-13s,",pData->mSymbol);
             fprintf(pData->mOutfile,"%-13.2f,",pData->mTotalTime);
@@ -999,7 +999,7 @@ void perfDataReportHeader(FILE* outfile)
         fprintf(outfile,
         "\n\n\n\t\t\t\t\t *** Statistics Summary For Execution ***\n");
         fprintf(outfile, "  Symbol Name ,");
-        fprintf(outfile,opHeaderAcrossAll);
+        fprintf(outfile, "%s", opHeaderAcrossAll);
     }
 }
 void printPerfDataReport(perfData* pData,FILE* outfile)