diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2014-01-02 12:12:00 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2014-01-06 11:39:15 +0100 |
commit | 3ede7323a5f84cb3e02883b1282b9358a760d317 (patch) | |
tree | cfdc98eaa39bb7f39066f26341c6ef09973e69a1 /SpiceXPI/src | |
parent | 4b9075ecc830ff6716509cbcad3017e831032c14 (diff) |
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).
Diffstat (limited to 'SpiceXPI/src')
-rw-r--r-- | SpiceXPI/src/plugin/controller-unix.cpp | 2 | ||||
-rw-r--r-- | SpiceXPI/src/plugin/controller.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
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(); } |