Hi,

A couple of simple one-line patches to remove a couple of compiler
warnings (format not a string literal and no format arguments).

Nigel.
>From 3aada43619b93fcd7897fcdec80bb6c35dde7cef Mon Sep 17 00:00:00 2001
From: Nigel Hawkins <n.hawk...@gmx.com>
Date: Wed, 3 Nov 2010 15:41:00 +0000
Subject: [PATCH] ure: fix fprintf compile warnings in unoexe.cxx

---
 cpputools/source/unoexe/unoexe.cxx |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index bac822b..83afad1 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -132,7 +132,7 @@ static sal_Bool s_quiet = false;
 static inline void out( const sal_Char * pText )
 {
     if (! s_quiet)
-        fprintf( stderr, pText );
+        fprintf( stderr, "%s", pText );
 }
 //--------------------------------------------------------------------------------------------------
 static inline void out( const OUString & rText )
@@ -140,7 +140,7 @@ static inline void out( const OUString & rText )
     if (! s_quiet)
     {
         OString aText( OUStringToOString( rText, RTL_TEXTENCODING_ASCII_US ) );
-        fprintf( stderr, aText.getStr() );
+        fprintf( stderr, "%s", aText.getStr() );
     }
 }
 
-- 
1.7.0.4

>From 63dad46d5567755a320a577c7cef11100ee81626 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins <n.hawk...@gmx.com>
Date: Wed, 3 Nov 2010 16:02:56 +0000
Subject: [PATCH 1/2] vcl: fix fprintf compile warnings in sft.cxx

---
 vcl/source/fontsubset/sft.cxx |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index aa6fd99..5a54ef2 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2058,7 +2058,7 @@ int  CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, /*FO
     fprintf(outf, h02, modname, modver, modextra);
     fprintf(outf, h09, ttf->psname);
 
-    fprintf(outf, h10);
+    fprintf(outf, "%s", h10);
     fprintf(outf, h11, fname);
 /*    fprintf(outf, h12, 4000000); */
 
@@ -2073,17 +2073,17 @@ int  CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, /*FO
      */
 
     fprintf(outf, h17, rtl_crc32(0, ttf->ptr, ttf->fsize), nGlyphs, rtl_crc32(0, glyphArray, nGlyphs * 2), rtl_crc32(0, encoding, nGlyphs));
-    fprintf(outf, h13);
+    fprintf(outf, "%s", h13);
     fprintf(outf, h14, XUnits(UPEm, GetInt16(table, 36, 1)), XUnits(UPEm, GetInt16(table, 38, 1)), XUnits(UPEm, GetInt16(table, 40, 1)), XUnits(UPEm, GetInt16(table, 42, 1)));
-    fprintf(outf, h15);
+    fprintf(outf, "%s", h15);
 
     for (i = 0; i < nGlyphs; i++) {
         fprintf(outf, h16, encoding[i], i);
     }
 
     fprintf(outf, h30, nGlyphs+1);
-    fprintf(outf, h31);
-    fprintf(outf, h32);
+    fprintf(outf, "%s", h31);
+    fprintf(outf, "%s", h32);
 
     for (i = 0; i < nGlyphs; i++) {
         fprintf(outf, h33, i);
@@ -2131,14 +2131,14 @@ int  CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, /*FO
         }
         if (n > 0) fprintf(outf, "\tfill\n");     /* if glyph is not a whitespace character */
 
-        fprintf(outf, h34);
+        fprintf(outf, "%s", h34);
 
         free(pa);
         free(path);
     }
-    fprintf(outf, h35);
+    fprintf(outf, "%s", h35);
 
-    fprintf(outf, h40);
+    fprintf(outf, "%s", h40);
     fprintf(outf, h41, fname);
 
     return SF_OK;
-- 
1.7.0.4

>From 85ccb726a7cc6dbe7809ba4b7ac2e58ff88c5e1c Mon Sep 17 00:00:00 2001
From: Nigel Hawkins <n.hawk...@gmx.com>
Date: Wed, 3 Nov 2010 16:05:28 +0000
Subject: [PATCH 2/2] vcl: fix fprintf compile warnings in cff.cxx

---
 vcl/source/fontsubset/cff.cxx |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 854c03a..8536961 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -2048,7 +2048,7 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail,
         return;
 
     // emit the line head
-    mpPtr += sprintf( mpPtr, pLineHead);
+    mpPtr += sprintf( mpPtr, "%s", pLineHead);
     // emit the vector values
     ValVector::value_type aVal = 0;
     for( ValVector::const_iterator it = rVector.begin();;) {
@@ -2061,7 +2061,7 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail,
     // emit the last value
     mpPtr += dbl2str( mpPtr, aVal);
     // emit the line tail
-    mpPtr += sprintf( mpPtr, pLineTail);
+    mpPtr += sprintf( mpPtr, "%s", pLineTail);
 }
 
 // --------------------------------------------------------------------
-- 
1.7.0.4

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to