From 3ede7323a5f84cb3e02883b1282b9358a760d317 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Thu, 2 Jan 2014 12:12:00 +0100 Subject: Fix compilation with -Werror=format-security MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- SpiceXPI/src/plugin/controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SpiceXPI/src/plugin/controller.cpp') 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(); } -- cgit v1.2.3