[vino] libvncserver: fix non-literal format string issue



commit e2901096471c8aae551ff4de1b6ce9acb8971bff
Author: Ryan Lortie <desrt desrt ca>
Date:   Sun Mar 9 16:56:41 2014 -0400

    libvncserver: fix non-literal format string issue
    
    vino is built with -Werror=format-nonliteral by default and uses a
    non-literal format string.
    
    Tag the function that it is used from so that the compiler allows it.
    This has a side effect of ensuring that the users of this function are
    doing it correctly.
    
    The easiest way to do this correctly is to use the macro in glib, so we
    must include the header from this file (which did not yet have it).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726002

 server/libvncserver/main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/server/libvncserver/main.c b/server/libvncserver/main.c
index bb47388..016bbff 100644
--- a/server/libvncserver/main.c
+++ b/server/libvncserver/main.c
@@ -34,6 +34,8 @@
 #include <signal.h>
 #include <time.h>
 
+#include <glib.h>
+
 int rfbEnableLogging=1;
 
 #ifdef WORDS_BIGENDIAN
@@ -50,6 +52,8 @@ void rfbLogEnable(int enabled) {
  * rfbLog prints a time-stamped message to the log file (stderr).
  */
 
+static void rfbDefaultLog(const char *format, ...) G_GNUC_PRINTF (1, 2);
+
 static void
 rfbDefaultLog(const char *format, ...)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]