rpms/ekiga/FC-6 ekiga-2.0.2-format-string.patch, NONE, 1.1 ekiga.spec, 1.31, 1.32

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Mar 6 23:17:26 UTC 2007


Author: sandmann

Update of /cvs/dist/rpms/ekiga/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv20013

Modified Files:
	ekiga.spec 
Added Files:
	ekiga-2.0.2-format-string.patch 
Log Message:
Fix printf type functions

ekiga-2.0.2-format-string.patch:
 lib/gui/gmdialog.h                |   10 +++++-----
 lib/gui/gmstatusbar.c             |   10 +++-------
 lib/gui/gmstatusbar.h             |    6 +++---
 src/devices/videoinput.cpp        |    4 ++--
 src/endpoints/accountshandler.cpp |   12 ++++++------
 src/endpoints/manager.cpp         |   12 ++++++------
 src/endpoints/sip.cpp             |    6 +++---
 src/endpoints/urlhandler.cpp      |    4 ++--
 src/gui/accounts.cpp              |    2 +-
 src/gui/addressbook.cpp           |    4 ++--
 src/gui/chat.cpp                  |   13 ++++++++++---
 src/gui/chat.h                    |    2 +-
 src/gui/history.h                 |    2 +-
 src/gui/main.cpp                  |   15 +++++++++------
 src/gui/main.h                    |    6 +++---
 src/gui/misc.cpp                  |    2 +-
 16 files changed, 58 insertions(+), 52 deletions(-)

--- NEW FILE ekiga-2.0.2-format-string.patch ---
--- ekiga-2.0.5/src/gui/chat.cpp.format-string	2007-02-13 15:28:57.000000000 -0500
+++ ekiga-2.0.5/src/gui/chat.cpp	2007-03-06 17:48:30.000000000 -0500
@@ -1687,7 +1687,14 @@
 
   contact_url = gtk_entry_get_text (GTK_ENTRY (twp->remote_url));
   
-  if (!url || GMURL (contact_url) == GMURL (url))
-    gm_statusbar_push_info_message (GM_STATUSBAR (tw->statusbar), msg, args);
-  va_end (args);
+  if (!url || GMURL (contact_url) == GMURL (url)) {
+    char *buffer;
+    va_list args;
+    va_start (args, msg);
+    buffer = g_strdup_vprintf (msg, args);
+    va_end (args);
+    
+    gm_statusbar_push_info_message (GM_STATUSBAR (tw->statusbar), "%s", buffer);
+    g_free (buffer);
+  }
 }
--- ekiga-2.0.5/src/gui/addressbook.cpp.format-string	2007-02-13 15:28:57.000000000 -0500
+++ ekiga-2.0.5/src/gui/addressbook.cpp	2007-03-06 17:48:30.000000000 -0500
@@ -3163,7 +3163,7 @@
   dialog =
     gtk_message_dialog_new (GTK_WINDOW (parent_window),
 			    GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION,
-			    GTK_BUTTONS_YES_NO, confirm_msg);
+			    GTK_BUTTONS_YES_NO, "%s", confirm_msg);
   g_free (confirm_msg);
 
   gtk_dialog_set_default_response (GTK_DIALOG (dialog),
@@ -3640,7 +3640,7 @@
   dialog =
     gtk_message_dialog_new (GTK_WINDOW (addressbook_window),
 			    GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION,
-			    GTK_BUTTONS_YES_NO, confirm_msg);
+			    GTK_BUTTONS_YES_NO, "%s", confirm_msg);
   g_free (confirm_msg);
 
   gtk_dialog_set_default_response (GTK_DIALOG (dialog),
--- ekiga-2.0.5/src/gui/main.cpp.format-string	2007-02-13 15:28:57.000000000 -0500
+++ ekiga-2.0.5/src/gui/main.cpp	2007-03-06 17:48:30.000000000 -0500
@@ -2311,7 +2311,7 @@
   info = g_strdup_printf (_("Missed calls: %d - Voice Mails: %s"),
 			  ep->GetMissedCallsNumber (),
 			  (const char *) ep->GetMWI ());
-  gm_main_window_push_info_message (GTK_WIDGET (data), info);
+  gm_main_window_push_info_message (GTK_WIDGET (data), "%s", info);
   g_free (info);
 
 
@@ -4286,7 +4286,7 @@
 
   va_start (args, msg);
   vsnprintf (buffer, 1024, msg, args);
-  gm_statusbar_flash_message (GM_STATUSBAR (mw->statusbar), buffer);
+  gm_statusbar_flash_message (GM_STATUSBAR (mw->statusbar), "%s", buffer);
   va_end (args);
 }
 
@@ -4306,7 +4306,7 @@
   mw = gm_mw_get_mw (main_window);
   
   info = g_strdup_printf (_("Missed calls: %d - Voice Mails: %s"), missed, vm);
-  gm_main_window_push_info_message (main_window, info);
+  gm_main_window_push_info_message (main_window, "%s", info);
 
   g_free (info);
 }
@@ -4329,7 +4329,7 @@
 
   va_start (args, msg);
   vsnprintf (buffer, 1024, msg, args);
-  gm_statusbar_push_message (GM_STATUSBAR (mw->statusbar), buffer);
+  gm_statusbar_push_message (GM_STATUSBAR (mw->statusbar), "%s", buffer);
   va_end (args);
 }
 
@@ -4340,6 +4340,7 @@
 				  ...)
 {
   GmWindow *mw = NULL;
+  char *buffer;
   
   g_return_if_fail (main_window != NULL);
 
@@ -4348,7 +4349,9 @@
   va_list args;
 
   va_start (args, msg);
-  gm_statusbar_push_info_message (GM_STATUSBAR (mw->statusbar), msg, args);
+  buffer = g_strdup_vprintf (msg, args);
+  gm_statusbar_push_info_message (GM_STATUSBAR (mw->statusbar), "%s", buffer);
+  g_free (buffer);
   va_end (args);
 }
 
@@ -4570,7 +4573,7 @@
     msg = g_strdup_printf (_("Ekiga got an invalid value for the GConf key %s.\n\nIt probably means that your GConf schemas have not been correctly installed or the that permissions are not correct.\n\nPlease check the FAQ (http://www.ekiga.org/), the troubleshooting section of the GConf site (http://www.gnome.org/projects/gconf/) or the mailing list archives for more information (http://mail.gnome.org) about this problem."), key_name);
     
     dialog = gnomemeeting_error_dialog (GTK_WINDOW (main_window),
-					_("Gconf key error"), msg);
+					_("Gconf key error"), "%s", msg);
 
     g_signal_handlers_disconnect_by_func (G_OBJECT (dialog),
 					  (gpointer) gtk_widget_destroy,
--- ekiga-2.0.5/src/gui/chat.h.format-string	2007-02-13 15:28:57.000000000 -0500
+++ ekiga-2.0.5/src/gui/chat.h	2007-03-06 17:48:30.000000000 -0500
@@ -115,7 +115,7 @@
 void gm_chat_window_push_info_message (GtkWidget *chat_window,
 				       const char *url,
 				       const char *msg,
-				       ...);
+				       ...) G_GNUC_PRINTF(3,4);
 
 G_END_DECLS
 
--- ekiga-2.0.5/src/gui/history.h.format-string	2007-02-13 15:28:57.000000000 -0500
+++ ekiga-2.0.5/src/gui/history.h	2007-03-06 17:48:30.000000000 -0500
@@ -55,6 +55,6 @@
 void
 gm_history_window_insert (GtkWidget *log_window, 
 			  const char *format,
-			  ...);
+			  ...) G_GNUC_PRINTF(2,3);
 
 #endif /* _LOG_WINDOW_H_ */
--- ekiga-2.0.5/src/gui/main.h.format-string	2007-02-13 15:28:57.000000000 -0500
+++ ekiga-2.0.5/src/gui/main.h	2007-03-06 17:48:30.000000000 -0500
@@ -338,7 +338,7 @@
  */
 void gm_main_window_flash_message (GtkWidget *main_window,
 				   const char *msg,
-				   ...);
+				   ...) G_GNUC_PRINTF(2,3);
 
 
 /* DESCRIPTION   :  /
@@ -359,7 +359,7 @@
  */
 void gm_main_window_push_message (GtkWidget *main_window,
 				  const char *msg,
-				  ...);
+				  ...) G_GNUC_PRINTF(2,3);
 
 
 /* DESCRIPTION   :  /
@@ -369,7 +369,7 @@
  */
 void gm_main_window_push_info_message (GtkWidget *main_window,
 				       const char *msg,
-				       ...);
+				       ...) G_GNUC_PRINTF(2,3);
 
 /* DESCRIPTION   :  /
  * BEHAVIOR      : Sets the given URL as called URL.
--- ekiga-2.0.5/src/gui/misc.cpp.format-string	2007-02-13 15:28:57.000000000 -0500
+++ ekiga-2.0.5/src/gui/misc.cpp	2007-03-06 17:48:30.000000000 -0500
@@ -113,7 +113,7 @@
   gdk_threads_enter ();
   gnomemeeting_error_dialog (GTK_WINDOW (main_window), 
 			     _("Error"),
-			     (gchar *) data);
+			     "%s", (gchar *) data);
   gdk_threads_leave ();
 
   return FALSE;
--- ekiga-2.0.5/src/gui/accounts.cpp.format-string	2007-02-13 15:28:57.000000000 -0500
+++ ekiga-2.0.5/src/gui/accounts.cpp	2007-03-06 17:48:30.000000000 -0500
@@ -718,7 +718,7 @@
   dialog =
     gtk_message_dialog_new (GTK_WINDOW (accounts_window),
 			    GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION,
-			    GTK_BUTTONS_YES_NO, confirm_msg);
+			    GTK_BUTTONS_YES_NO, "%s", confirm_msg);
   g_free (confirm_msg);
 
   gtk_dialog_set_default_response (GTK_DIALOG (dialog),
--- ekiga-2.0.5/src/devices/videoinput.cpp.format-string	2007-02-13 15:28:56.000000000 -0500
+++ ekiga-2.0.5/src/devices/videoinput.cpp	2007-03-06 17:48:30.000000000 -0500
@@ -392,7 +392,7 @@
 	gnomemeeting_warning_dialog_on_widget (GTK_WINDOW (main_window),
 					       VIDEO_DEVICES_KEY "enable_preview",
 					       dialog_title,
-					       dialog_msg);
+					       "%s", dialog_msg);
 	g_free (dialog_msg);
 	g_free (dialog_title);
 	g_free (tmp_msg);
@@ -706,7 +706,7 @@
     gdk_threads_enter ();
     gnomemeeting_error_dialog (GTK_WINDOW (druid_window),
 			       _("Failed to open the device"),
-			       dialog_msg);
+			       "%s", dialog_msg);
     gdk_threads_leave ();
     
     g_free (dialog_msg);
--- ekiga-2.0.5/src/endpoints/sip.cpp.format-string	2007-02-13 15:28:56.000000000 -0500
+++ ekiga-2.0.5/src/endpoints/sip.cpp	2007-03-06 17:49:19.000000000 -0500
@@ -248,7 +248,7 @@
 						    wasRegistering);
 #endif
 
-  gm_history_window_insert (history_window, msg);
+  gm_history_window_insert (history_window, "%s", msg);
   gm_main_window_flash_message (main_window, "%s", msg);
   if (endpoint.GetCallingState() == GMManager::Standby)
     gm_main_window_set_account_info (main_window, 
@@ -341,8 +341,8 @@
 					     NULL);
   }
 
-  gm_history_window_insert (history_window, msg);
-  gm_main_window_push_message (main_window, msg);
+  gm_history_window_insert (history_window, "%s", msg);
+  gm_main_window_push_message (main_window, "%s", msg);
   gnomemeeting_threads_leave ();
 
   /* Signal the SIP Endpoint */
--- ekiga-2.0.5/src/endpoints/manager.cpp.format-string	2007-02-13 15:28:56.000000000 -0500
+++ ekiga-2.0.5/src/endpoints/manager.cpp	2007-03-06 17:51:54.000000000 -0500
@@ -672,7 +672,7 @@
   msg = g_strdup_printf (_("Forwarding call to %s"),
 			 (const char*) forward_party);
   gm_main_window_flash_message (main_window, "%s", msg);
-  gm_history_window_insert (history_window, msg);
+  gm_history_window_insert (history_window, "%s", msg);
   gnomemeeting_threads_leave ();
   g_free (msg);
 
@@ -827,7 +827,7 @@
   gnomemeeting_threads_enter ();
   gm_main_window_flash_message (main_window, "%s", msg);
   gm_chat_window_push_info_message (chat_window, NULL, msg);
-  gm_history_window_insert (history_window, msg);
+  gm_history_window_insert (history_window, "%s", msg);
   gnomemeeting_threads_leave ();
   g_free (msg);
 
@@ -867,7 +867,7 @@
   if (short_reason) 
     gm_main_window_flash_message (main_window, "%s", short_reason);
   if (long_reason)
-    gm_history_window_insert (history_window, long_reason);
+    gm_history_window_insert (history_window, "%s", long_reason);
   gnomemeeting_threads_leave ();
   
   /* Update the current state if action is 0 or 4.
@@ -1289,7 +1289,7 @@
 				 t.AsString (0),
 				 msg_reason,
 				 utf8_app);
-  gm_history_window_insert (history_window, msg_reason);
+  gm_history_window_insert (history_window, "%s", msg_reason);
   gm_main_window_flash_message (main_window, "%s", msg_reason);
   gm_chat_window_push_info_message (chat_window, NULL, "");
   gnomemeeting_threads_leave ();
@@ -1913,7 +1913,7 @@
 
   /* Update the GUI and menus wrt opened channels */
   gnomemeeting_threads_enter ();
-  gm_history_window_insert (history_window, msg);
+  gm_history_window_insert (history_window, "%s", msg);
   gm_main_window_update_sensitivity (main_window, is_video, is_video?is_receiving_video:is_receiving_audio, is_video?is_transmitting_video:is_transmitting_audio);
   gm_main_window_set_channel_pause (main_window, FALSE, is_video);
   gm_main_window_set_call_info (main_window, 
@@ -2114,7 +2114,7 @@
 
 
   gdk_threads_enter ();
-  gm_main_window_push_info_message (main_window, msg);
+  gm_main_window_push_info_message (main_window, "%s", msg);
   gm_main_window_update_stats (main_window,
 			       lost_packets_per,
 			       late_packets_per,
--- ekiga-2.0.5/src/endpoints/urlhandler.cpp.format-string	2007-02-13 15:28:56.000000000 -0500
+++ ekiga-2.0.5/src/endpoints/urlhandler.cpp	2007-03-06 17:48:30.000000000 -0500
@@ -471,8 +471,8 @@
     else
       msg = g_strdup_printf (_("Transferring call to %s"), 
 			     (const char *) call_address);
-    gm_history_window_insert (history_window, msg);
-    gm_main_window_push_message (main_window, msg);
+    gm_history_window_insert (history_window, "%s", msg);
+    gm_main_window_push_message (main_window, "%s", msg);
     g_free (msg);
   }
   gnomemeeting_threads_leave ();
--- ekiga-2.0.5/src/endpoints/accountshandler.cpp.format-string	2007-02-13 15:28:56.000000000 -0500
+++ ekiga-2.0.5/src/endpoints/accountshandler.cpp	2007-03-06 17:48:30.000000000 -0500
@@ -202,8 +202,8 @@
 			     a->host?a->host:"");
 
       gnomemeeting_threads_enter ();
-      gm_main_window_push_message (main_window, msg);
-      gm_history_window_insert (history_window, msg);
+      gm_main_window_push_message (main_window, "%s", msg);
+      gm_history_window_insert (history_window, "%s", msg);
       gm_accounts_window_update_account_state (accounts_window,
 					       FALSE,
 					       a->host,
@@ -312,8 +312,8 @@
       msg = g_strdup_printf (_("Registered to %s"), a->host);
 
     gnomemeeting_threads_enter ();
-    gm_main_window_push_message (main_window, msg);
-    gm_history_window_insert (history_window, msg);
+    gm_main_window_push_message (main_window, "%s", msg);
+    gm_history_window_insert (history_window, "%s", msg);
     gm_accounts_window_update_account_state (accounts_window,
 					     FALSE,
 					     a->host,
@@ -343,8 +343,8 @@
     h323EP->RemoveAliasName (a->username);
 
     gnomemeeting_threads_enter ();
-    gm_main_window_push_message (main_window, msg);
-    gm_history_window_insert (history_window, msg);
+    gm_main_window_push_message (main_window, "%s", msg);
+    gm_history_window_insert (history_window, "%s", msg);
     gm_accounts_window_update_account_state (accounts_window,
 					     FALSE,
 					     a->host,
--- ekiga-2.0.5/lib/gui/gmstatusbar.c.format-string	2007-02-13 15:29:05.000000000 -0500
+++ ekiga-2.0.5/lib/gui/gmstatusbar.c	2007-03-06 17:48:30.000000000 -0500
@@ -47,8 +47,8 @@
 static void gm_sb_push_message (GmStatusbar *, 
 				gboolean,
 				gboolean,
-				const char *, 
-				...);
+				const char *,
+				va_list args);
 
 static int  gm_statusbar_clear_msg_cb (gpointer);
 
@@ -100,7 +100,7 @@
 		    gboolean flash_message,
 		    gboolean info_message,
 		    const char *msg, 
-		    ...)
+		    va_list args)
 {
   gint id = 0;
   gint msg_id = 0;
@@ -120,16 +120,12 @@
 
   if (msg) {
 
-    va_list args;
     char buffer [1025];
 
-    va_start (args, msg);
     vsnprintf (buffer, 1024, msg, args);
 
     msg_id = gtk_statusbar_push (GTK_STATUSBAR (sb), id, buffer);
 
-    va_end (args);
-
     if (flash_message)
       gtk_timeout_add (15000, gm_statusbar_clear_msg_cb, 
 		       GINT_TO_POINTER (msg_id));
--- ekiga-2.0.5/lib/gui/gmstatusbar.h.format-string	2007-02-13 15:29:05.000000000 -0500
+++ ekiga-2.0.5/lib/gui/gmstatusbar.h	2007-03-06 17:48:30.000000000 -0500
@@ -94,7 +94,7 @@
  */
 void gm_statusbar_flash_message (GmStatusbar *, 
 				 const char *msg, 
-				 ...);
+				 ...) G_GNUC_PRINTF(2,3);
 
 
 /* DESCRIPTION  :  /
@@ -105,7 +105,7 @@
  */
 void gm_statusbar_push_message (GmStatusbar *, 
 				const char *msg, 
-				...);
+				...) G_GNUC_PRINTF(2,3);
 
 
 /* DESCRIPTION  :  /
@@ -116,7 +116,7 @@
  */
 void gm_statusbar_push_info_message (GmStatusbar *, 
 				     const char *msg, 
-				     ...);
+				     ...) G_GNUC_PRINTF(2,3);
 
 G_END_DECLS
 
--- ekiga-2.0.5/lib/gui/gmdialog.h.format-string	2007-02-13 15:29:05.000000000 -0500
+++ ekiga-2.0.5/lib/gui/gmdialog.h	2007-03-06 17:48:30.000000000 -0500
@@ -127,7 +127,7 @@
 						  const char *,
 						  const char *,
 						  const char *,
-						  ...);
+						  ...) G_GNUC_PRINTF(4,5);
 
 
 /**
@@ -140,7 +140,7 @@
 GtkWidget *gnomemeeting_error_dialog (GtkWindow *parent,
 				      const char *,
 				      const char *format,
-				      ...);
+				      ...) G_GNUC_PRINTF(3,4);
 
 
 /**
@@ -153,7 +153,7 @@
 GtkWidget *gnomemeeting_warning_dialog (GtkWindow *parent,
 					const char *,
 					const char *format,
-					...);
+					...) G_GNUC_PRINTF(3,4);
 
 
 /**
@@ -166,7 +166,7 @@
 GtkWidget *gnomemeeting_message_dialog (GtkWindow *parent,
 					const char *,
 					const char *format,
-					...);
+					...) G_GNUC_PRINTF(3,4);
 
 
 /**
@@ -179,7 +179,7 @@
 GtkWidget *gnomemeeting_progress_dialog (GtkWindow *parent,
 					 const char *,
 					 const char *format,
-					 ...);
+					 ...) G_GNUC_PRINTF(3,4);
 
 G_END_DECLS
 


Index: ekiga.spec
===================================================================
RCS file: /cvs/dist/rpms/ekiga/FC-6/ekiga.spec,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- ekiga.spec	21 Feb 2007 01:45:24 -0000	1.31
+++ ekiga.spec	6 Mar 2007 23:17:23 -0000	1.32
@@ -1,11 +1,12 @@
 Summary: A Gnome based SIP/H323 teleconferencing application
 Name: ekiga
 Version: 2.0.5
-Release: 2%{?dist}
+Release: 3%{?dist}
 URL: http://www.ekiga.org/
 Source0: http://www.ekiga.org/ekiga-%{version}.tar.gz
 # fixed in upstream cvs
 Patch1: ekiga-2.0.2-transparent.patch
+Patch2: ekiga-2.0.2-format-string.patch
 License: GPL
 Group: Applications/Communications
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
@@ -48,9 +49,11 @@
 %prep
 %setup -q
 %patch1 -p1 -b .transparent
+%patch2 -p1 -b .format-string
 
 %build
-CXXFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED=1 -fPIC"
+CXXFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED=1 -fPIC -Wformat-nonliteral"
+CFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED=1 -fPIC -Wformat-nonliteral"
 # We disable howl for now, waiting for ekiga 2.0 to ship with avahi support
 %configure --disable-scrollkeeper 
 make
@@ -96,6 +99,11 @@
 %{_sysconfdir}/gconf/schemas/ekiga.schemas
 
 %changelog
+* Tue Mar 06 2007 Soren Sandmann <sandmann at redhat.com> - 2.0.5-3
+- Add -Wnon-literal 
+- ekiga-2.0.2-format-string.patch - add G_GNUC_PRINTF annotations and
+  fix the resulting warnings. 
+
 * Tue Feb 20 2007 Soren Sandmann <sandmann at redhat.com> - 2.0.5-2
 - Rebuild
 




More information about the fedora-cvs-commits mailing list