[Spice-commits] SpiceXPI/src

Christophe Fergau teuf at kemper.freedesktop.org
Mon Jan 6 02:40:32 PST 2014


 SpiceXPI/src/plugin/controller-unix.cpp |    2 +-
 SpiceXPI/src/plugin/controller.cpp      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3ede7323a5f84cb3e02883b1282b9358a760d317
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu Jan 2 12:12:00 2014 +0100

    Fix compilation with -Werror=format-security
    
    The Debian package of spice-xpi failed to build on powerpc and sparc in
    Debian, failing with this error message:
    
      make[6]: Entering directory `/«PKGBUILDDIR»/SpiceXPI/src/plugin'
        CXX    libnsISpicec_la-controller.lo
      controller.cpp: In destructor 'SpiceController::~SpiceController()':
      controller.cpp:73:5: error: format not a string literal and no format
        arguments [-Werror=format-security]
      cc1plus: some warnings being treated as errors
    
    The error is in a call to g_debug(G_STRFUNC). As this is a constant string,
    we can just replace the call with g_debug("%s", G_STRFUNC).

diff --git a/SpiceXPI/src/plugin/controller-unix.cpp b/SpiceXPI/src/plugin/controller-unix.cpp
index 1e60e5c..d9bf9a5 100644
--- a/SpiceXPI/src/plugin/controller-unix.cpp
+++ b/SpiceXPI/src/plugin/controller-unix.cpp
@@ -72,7 +72,7 @@ SpiceControllerUnix::SpiceControllerUnix(nsPluginInstance *aPlugin):
 
 SpiceControllerUnix::~SpiceControllerUnix()
 {
-    g_debug(G_STRFUNC);
+    g_debug("%s", G_STRFUNC);
     Disconnect();
 
     // delete the temporary directory used for a client socket
diff --git a/SpiceXPI/src/plugin/controller.cpp b/SpiceXPI/src/plugin/controller.cpp
index ac97ce1..e787012 100644
--- a/SpiceXPI/src/plugin/controller.cpp
+++ b/SpiceXPI/src/plugin/controller.cpp
@@ -64,7 +64,7 @@ SpiceController::SpiceController(nsPluginInstance *aPlugin):
 
 SpiceController::~SpiceController()
 {
-    g_debug(G_STRFUNC);
+    g_debug("%s", G_STRFUNC);
     Disconnect();
 }
 


More information about the Spice-commits mailing list