Wireshark-dev: [Wireshark-dev] [PATCH] compilation errors if configure -without -disable-warnin
From: didier <[email protected]>
Date: Mon, 11 Jun 2007 15:06:27 +0200
Hi,

patch1.diff: If configure with --with-plugins=no
error in  gtk/about_dlg.c

gtk1.diff: if configure with gtk1
errors in gtk/column_prefs.c 
epan/dissectors/packet-dcom.c (fix copy and paste from packet-cops.c)

patch2.diff: on powerpc unsigned char by default
error in epan/dissectors/packet-iuup.c
I haven't tested this one, no capture.

Didier

Index: gtk/column_prefs.c
===================================================================
--- gtk/column_prefs.c	(révision 22073)
+++ gtk/column_prefs.c	(copie de travail)
@@ -47,9 +47,9 @@
                                       GdkEvent *event, gpointer user_data);
 #else
 static void   column_list_select_cb(GtkTreeSelection *, gpointer);
+static void   column_entry_changed_cb(GtkEditable *, gpointer);
 #endif
 static void   column_list_new_cb(GtkWidget *, gpointer);
-static void   column_entry_changed_cb(GtkEditable *, gpointer);
 static void   column_menu_changed_cb(GtkWidget *, gpointer);
 static void   column_list_delete_cb(GtkWidget *, gpointer);
 static void   column_arrow_cb(GtkWidget *, gpointer);
@@ -494,25 +494,14 @@
     cfile.cinfo.columns_changed = TRUE;
 }
 
+#if GTK_MAJOR_VERSION >= 2
 /* The user changed the column title entry box. */
 static void
 column_entry_changed_cb(GtkEditable *te, gpointer data) {
     fmt_data         *cfmt;
     GList            *clp;
     gchar            *title;
-#if GTK_MAJOR_VERSION < 2
-    GtkCList         *cl = data;
 
-    if (cur_row >= 0) {
-        title = gtk_editable_get_chars(te, 0, -1);
-        clp   = gtk_clist_get_row_data(cl, cur_row);
-        cfmt  = (fmt_data *) clp->data;
-
-        gtk_clist_set_text(cl, cur_row, 0, title);
-        g_free(cfmt->title);
-        cfmt->title = title;
-    }
-#else
     GtkTreeView      *tree = (GtkTreeView *)data;
     GtkTreeSelection *sel;
     GtkTreeModel     *model;
@@ -529,9 +518,9 @@
         g_free(cfmt->title);
         cfmt->title = title;
     }
-#endif
     cfile.cinfo.columns_changed = TRUE;
 }
+#endif
 
 /* The user changed the format menu. */
 static void
Index: epan/dissectors/packet-dcom.c
===================================================================
--- epan/dissectors/packet-dcom.c	(révision 22073)
+++ epan/dissectors/packet-dcom.c	(copie de travail)
@@ -87,7 +87,9 @@
 #include <epan/emem.h>
 #include <epan/addr_resolv.h>
 #include <epan/inet_aton.h>
-#include <isprint.h>
+#include <ctype.h>
+
+#include "isprint.h"
 #include "packet-dcerpc.h"
 #include "packet-dcom.h"
 #include "prefs.h"
Index: gtk/about_dlg.c
===================================================================
--- gtk/about_dlg.c	(révision 22073)
+++ gtk/about_dlg.c	(copie de travail)
@@ -423,7 +423,10 @@
 {
   GtkWidget   *main_vb, *main_nb, *bbox, *ok_btn;
 
-  GtkWidget   *page_lb, *about_page, *folders_page, *plugins_page;
+  GtkWidget   *page_lb, *about_page, *folders_page;
+#ifdef HAVE_PLUGINS
+  GtkWidget    *plugins_page;
+#endif  
 #if GTK_MAJOR_VERSION >= 2 || GTK_MINOR_VERSION >= 3
   GtkWidget   *authors_page, *license_page;
 #endif
Index: epan/dissectors/packet-iuup.c
===================================================================
--- epan/dissectors/packet-iuup.c	(révision 22073)
+++ epan/dissectors/packet-iuup.c	(copie de travail)
@@ -398,9 +398,9 @@
     unsigned int data = ( byte1<<8 | byte2 ) << 6;
     remainder = data;
 
-    for (bit = 15; bit >= 0; --bit)
+    for (bit = 16; bit > 0; --bit)
     {
-        if (remainder & (0x40 << bit))
+        if (remainder & (0x20 << bit))
         {
             remainder ^= polynomial;
         }