[pkg-otr-team] [irssi-plugin-otr] 151/167: Build cleanly with -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wformat-security

Holger Levsen holger at moszumanska.debian.org
Mon Mar 3 21:55:41 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to tag 4.0.0
in repository irssi-plugin-otr.

commit 3e8acc5309b5e8a5646c475a06425f7226ebedf6
Author: Ian Goldberg <iang at cs.uwaterloo.ca>
Date:   Wed Aug 22 15:38:52 2012 -0400

    Build cleanly with -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wformat-security
---
 ChangeLog    | 14 ++++++++++++++
 configure.ac |  7 +++++++
 gtk-dialog.c |  8 ++++----
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ebc93bb..31b3d1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2012-08-22
+
+	* configure.ac:
+	* Makefile.mingw: Use gcc and ld hardening flags, where possible.
+	* patches/win32/rndw32.c:
+	* patches/win32/libgcrypt-config.h.patch: Include required win32
+	build patches right here in the source tree
+	* INSTALL.mingw: Be much more thorough in describing how to
+	cross-compile pidgin-otr.dll on Linux
+	* configure.ac:
+	* gtk-dialog.c: Build cleanly with -Wall -Wextra
+	-Wno-unused-parameter -Wno-missing-field-initializers
+	-Wformat-security
+
 2012-08-16
 
 	* packaging/windows/pidgin-otr.nsi: Modifications to the nsi
diff --git a/configure.ac b/configure.ac
index 8540446..c48f1e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,6 +145,13 @@ if test x$enable_gcc_hardening != xno; then
     OTR_CHECK_CFLAGS(-Wstack-protector)
     OTR_CHECK_CFLAGS(-fwrapv)
     OTR_CHECK_CFLAGS(--param ssp-buffer-size=1)
+
+    dnl Ian added the next four:
+    OTR_CHECK_CFLAGS(-fno-strict-overflow)
+    OTR_CHECK_CFLAGS(-Wall)
+    OTR_CHECK_CFLAGS(-Wextra -Wno-unused-parameter -Wno-missing-field-initializers)
+    OTR_CHECK_CFLAGS(-Wformat-security)
+
     if test "$bwin32" = "false"; then
        OTR_CHECK_CFLAGS(-fPIE)
        OTR_CHECK_LDFLAGS(-pie, "$all_ldflags_for_check", "$all_libs_for_check")
diff --git a/gtk-dialog.c b/gtk-dialog.c
index b02fdaa..1047f8f 100644
--- a/gtk-dialog.c
+++ b/gtk-dialog.c
@@ -2316,7 +2316,7 @@ static void otr_add_buddy_instances_top_menu(PidginConversation *gtkconv,
     GtkWidget * tooltip_menu;
     gchar *tooltip_text;
     gpointer gp_instance;
-    otrl_instag_t * selected_instance;
+    otrl_instag_t * selected_instance = NULL;
     gboolean selection_exists = 0;
     ConnContext * context = instances->data;
     TrustLevel level = TRUST_NOT_PRIVATE;
@@ -2712,7 +2712,7 @@ static void otr_check_conv_status_change( PurpleConversation *conv) {
     ConnContext *context = otrg_plugin_conv_to_context(conv,
 	    OTRL_INSTAG_RECENT, 0);
 
-    int *previous_level;
+    TrustLevel *previous_level;
     char *buf;
     char *status = "";
 
@@ -3059,7 +3059,7 @@ static char* conversation_timestamp(PurpleConversation *conv, time_t mtime,
     TrustLevel current_level = TRUST_NOT_PRIVATE;
     ConnContext *context = (ConnContext *) otrg_plugin_conv_to_context(conv,
 	    OTRL_INSTAG_RECENT, 0);
-    int *previous_level;
+    TrustLevel *previous_level;
     int id;
 
 
@@ -3078,7 +3078,7 @@ static char* conversation_timestamp(PurpleConversation *conv, time_t mtime,
      * level we received corresponds to the active conversation.  */
     if (conv == gtkconv->active_conv) {
 	/* 'free' is handled by the hashtable */
-	int * current_level_ptr = malloc(sizeof(int));
+	TrustLevel * current_level_ptr = malloc(sizeof(TrustLevel));
 	*current_level_ptr = current_level;
 	g_hash_table_replace ( otr_win_status, gtkconv, current_level_ptr );
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-otr/packages/irssi-plugin-otr.git



More information about the Pkg-otr-team mailing list