changeset 21866:03c950701fac

Move some curly braces around so static analysis tools can properly detect functions without having to preprocess the source
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 18 Dec 2007 15:56:06 +0000
parents 886fa5f83f91
children 91684de72a5c
files libpurple/ft.c libpurple/log.c libpurple/protocols/msn/soap.c pidgin/gtkimhtml.c pidgin/gtkimhtmltoolbar.c pidgin/gtkrequest.c pidgin/gtkutils.c
diffstat 7 files changed, 18 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/ft.c	Tue Dec 18 15:53:05 2007 +0000
+++ b/libpurple/ft.c	Tue Dec 18 15:56:06 2007 +0000
@@ -479,10 +479,11 @@
 		/* Sending a file */
 		/* Check the filename. */
 #ifdef _WIN32
-		if (g_strrstr(filename, "../") || g_strrstr(filename, "..\\")) {
+		if (g_strrstr(filename, "../") || g_strrstr(filename, "..\\"))
 #else
-		if (g_strrstr(filename, "../")) {
+		if (g_strrstr(filename, "../"))
 #endif
+		{
 			char *utf8 = g_filename_to_utf8(filename, -1, NULL, NULL, NULL);
 
 			msg = g_strdup_printf(_("%s is not a valid filename.\n"), utf8);
--- a/libpurple/log.c	Tue Dec 18 15:53:05 2007 +0000
+++ b/libpurple/log.c	Tue Dec 18 15:56:06 2007 +0000
@@ -348,7 +348,6 @@
 				void(*get_log_sets)(PurpleLogSetCallback cb, GHashTable *sets),
 				gboolean(*remove)(PurpleLog *log),
 				gboolean(*is_deletable)(PurpleLog *log))
-{
 #endif
 	PurpleLogLogger *logger;
 	va_list args;
--- a/libpurple/protocols/msn/soap.c	Tue Dec 18 15:53:05 2007 +0000
+++ b/libpurple/protocols/msn/soap.c	Tue Dec 18 15:56:06 2007 +0000
@@ -813,10 +813,8 @@
 		purple_debug_info("MSN SOAP", "Currently processing another SOAP request\n");
 	} else {
 		purple_debug_info("MSN SOAP", "No requests left to dispatch\n");
+#endif
 	}
-#else
-      }
-#endif
 
 }
 
--- a/pidgin/gtkimhtml.c	Tue Dec 18 15:53:05 2007 +0000
+++ b/pidgin/gtkimhtml.c	Tue Dec 18 15:56:06 2007 +0000
@@ -1136,14 +1136,13 @@
 #ifdef _WIN32
 	/* If we're on windows, let's see if we can get data from the HTML Format
 	   clipboard before we try to paste from the GTK buffer */
-	if (!clipboard_paste_html_win32(imhtml)) {
+	if (!clipboard_paste_html_win32(imhtml))
 #endif
+	{
 	GtkClipboard *clipboard = gtk_widget_get_clipboard(GTK_WIDGET(imhtml), GDK_SELECTION_CLIPBOARD);
 	gtk_clipboard_request_contents(clipboard, gdk_atom_intern("text/html", FALSE),
 				       paste_received_cb, imhtml);
-#ifdef _WIN32
 	}
-#endif
 	g_signal_stop_emission_by_name(imhtml, "paste-clipboard");
 }
 
@@ -3483,6 +3482,9 @@
 		return;
 	}
 #endif /* FILECHOOSER */
+#if 0 /* mismatched curly braces */
+	}
+#endif
 
 	/*
 	 * XXX - We should probably prompt the user to determine if they really
--- a/pidgin/gtkimhtmltoolbar.c	Tue Dec 18 15:53:05 2007 +0000
+++ b/pidgin/gtkimhtmltoolbar.c	Tue Dec 18 15:56:06 2007 +0000
@@ -467,10 +467,11 @@
 	GtkTextMark *ins;
 
 #if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */
-	if (response != GTK_RESPONSE_ACCEPT) {
+	if (response != GTK_RESPONSE_ACCEPT)
 #else /* FILECHOOSER */
-	if (response != GTK_RESPONSE_OK) {
+	if (response != GTK_RESPONSE_OK)
 #endif /* FILECHOOSER */
+	{
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->image), FALSE);
 		return;
 	}
--- a/pidgin/gtkrequest.c	Tue Dec 18 15:53:05 2007 +0000
+++ b/pidgin/gtkrequest.c	Tue Dec 18 15:56:06 2007 +0000
@@ -1502,7 +1502,9 @@
 	}
 
 #endif /* FILECHOOSER */
-
+#if 0 /* mismatched curly braces */
+	}
+#endif
 	if ((data->u.file.savedialog == TRUE) &&
 		(g_file_test(data->u.file.name, G_FILE_TEST_EXISTS))) {
 		purple_request_action(data, NULL, _("That file already exists"),
--- a/pidgin/gtkutils.c	Tue Dec 18 15:53:05 2007 +0000
+++ b/pidgin/gtkutils.c	Tue Dec 18 15:56:06 2007 +0000
@@ -2306,6 +2306,9 @@
 	}
 
 #endif /* FILECHOOSER */
+#if 0 /* mismatched curly braces */
+	}
+#endif
 	if (dialog->callback)
 		dialog->callback(filename, dialog->data);
 	gtk_widget_destroy(dialog->icon_filesel);