Constify a bunch of structure members and function arguments, to squelch
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 24 Jun 2005 01:32:42 +0000 (01:32 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 24 Jun 2005 01:32:42 +0000 (01:32 +0000)
compiler warnings.

Clean up indentation.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14739 f5534014-38df-0310-8fa8-9805f1628bb7

12 files changed:
epan/prefs.c
epan/prefs.h
gtk/dfilter_expr_dlg.c
gtk/http_stat.c
gtk/service_response_time_table.c
gtk/service_response_time_table.h
gtk/sip_stat.c
gtk/wsp_stat.c
tap-httpstat.c
tap-protohierstat.c
tap-sipstat.c
tap-wspstat.c

index 73465b81182d8f9e06854c41187167cbcc9223e6..058a947178345edfcc1da1663ea79cbac29b97f9 100644 (file)
@@ -487,7 +487,7 @@ find_preference(module_t *module, const char *name)
  * Returns TRUE if the given protocol has registered preferences
  */
 gboolean
-prefs_is_registered_protocol(char *name)
+prefs_is_registered_protocol(const char *name)
 {
        module_t *m = find_module(name);
 
@@ -498,7 +498,7 @@ prefs_is_registered_protocol(char *name)
  * Returns the module title of a registered protocol
  */
 const char *
-prefs_get_title_by_name(char *name)
+prefs_get_title_by_name(const char *name)
 {
        module_t *m = find_module(name);
 
index 2145a8de9ebfa71d7d0eabdcb4bf7dc201e4aaa5..d66ec6c12a5276d6c54540440808c9b14438b522 100644 (file)
@@ -239,12 +239,12 @@ typedef struct preference pref_t;
 /*
  * Returns TRUE if the given protocol has registered preferences.
  */
-extern gboolean prefs_is_registered_protocol(char *name);
+extern gboolean prefs_is_registered_protocol(const char *name);
 
 /*
  * Returns the module title of a registered protocol (or NULL if unknown).
  */
-extern const char *prefs_get_title_by_name(char *name);
+extern const char *prefs_get_title_by_name(const char *name);
 
 /*
  * Register a preference with an unsigned integral value.
index 154bd8fe972715353a5186e93bb526d3a1f422c5..5cee70387be22ff5df69c81865cc3737691089f4 100644 (file)
@@ -84,7 +84,7 @@ static void build_boolean_values(GtkWidget *value_list_scrolled_win,
 static void build_enum_values(GtkWidget *value_list_scrolled_win,
                               GtkWidget *value_list,
                               const value_string *values);
-static void add_value_list_item(GtkWidget *value_list, gchar *string,
+static void add_value_list_item(GtkWidget *value_list, const gchar *string,
                                 gpointer data);
 static void display_value_fields(header_field_info *hfinfo,
                                  gboolean is_comparison, GtkWidget *value_label,
@@ -503,7 +503,7 @@ build_enum_values(GtkWidget *value_list_scrolled_win _U_, GtkWidget *value_list,
 }
 
 static void
-add_value_list_item(GtkWidget *value_list, gchar *string, gpointer data)
+add_value_list_item(GtkWidget *value_list, const gchar *string, gpointer data)
 {
 #if GTK_MAJOR_VERSION < 2
     GtkWidget *label, *item;
index 0defcfebe6b05fb0d585fe456409dbbcd84a2f83..e7d7546c7d3f43bed73eb8b3dc6b9a5ed4efa751 100644 (file)
@@ -70,7 +70,7 @@ typedef struct _http_stats_t {
 typedef struct _http_response_code_t {
        guint32          packets;               /* 3 */
        guint            response_code;         /* 404 */
-       gchar           *name;                  /* Not Found */
+       const gchar     *name;                  /* Not Found */
        GtkWidget       *widget;                /* Label where we display it */
        GtkWidget       *table;                 /* Table in which we put it, e.g. client_error_box */
        httpstat_t      *sp;
index ec66036c257df3acf50e93a89a720b425d1243f5..862e258db709424539a210e9d91c6ce6a0739855 100644 (file)
@@ -328,7 +328,7 @@ srt_create_popup_menu(srt_stat_table *rst)
 
 
 void
-init_srt_table(srt_stat_table *rst, int num_procs, GtkWidget *vbox, char *filter_string)
+init_srt_table(srt_stat_table *rst, int num_procs, GtkWidget *vbox, const char *filter_string)
 {
        int i, j;
        column_arrows *col_arrows;
index 108cd91a007403578e330078fe322c6c029ce822..d2ac4c6426a6f753765f2532ba78fb46b6851081 100644 (file)
@@ -58,7 +58,8 @@ typedef struct _srt_stat_table {
  * @param vbox the corresponding GtkVBox to fill in
  * @param filter_string filter string or NULL
  */
-void init_srt_table(srt_stat_table *rst, int num_procs, GtkWidget *vbox, char *filter_string);
+void init_srt_table(srt_stat_table *rst, int num_procs, GtkWidget *vbox,
+                    const char *filter_string);
 
 /** Init an srt table row data structure.
  *
index 1e1edffb6cf6d4f5b36469559f95a0bf36b3e382..3f5dbc77d677e2dc05b2b2b3b687241e3382dde3 100644 (file)
@@ -73,13 +73,13 @@ typedef struct _sip_stats_t {
  * for example it can be { 3, 404, "Not Found" ,...}
  * which means we captured 3 reply sip/1.1 404 Not Found */
 typedef struct _sip_response_code_t {
-    guint32     packets;                   /* 3 */
-    guint               response_code;         /* 404 */
-    gchar              *name;                      /* "Not Found" */
-    GtkWidget  *widget;                    /* Label where we display it */
-    GtkWidget  *table;                     /* Table in which we put it,
-                                       e.g. client_error_table */
-    sipstat_t  *sp;                /* Pointer back to main struct */
+    guint32     packets;               /* 3 */
+    guint       response_code;         /* 404 */
+    const gchar        *name;                  /* "Not Found" */
+    GtkWidget  *widget;                /* Label where we display it */
+    GtkWidget  *table;                 /* Table in which we put it,
+                                          e.g. client_error_table */
+    sipstat_t  *sp;                    /* Pointer back to main struct */
 } sip_response_code_t;
 
 /* Used to keep track of the stats for a specific request string */
index 755a17ec8cae41da42573595d728dff327261f4e..e96056e5c10ad84c688f0ab39ebac425a0637610 100644 (file)
@@ -65,7 +65,7 @@ typedef struct _wsp_stats_t {
 } wspstat_t;
 /* used to keep track of a single type of status code */
 typedef struct _wsp_status_code_t {
-       gchar           *name;
+       const gchar     *name;
        guint32          packets;
        GtkWidget       *widget;/* label in which we print the number of packets */
        wspstat_t       *sp;    /* entire program interface */
@@ -311,8 +311,8 @@ gtk_wspstat_init(char *optarg)
        char            *title=NULL;
        GString         *error_string;
        GtkWidget       *main_vb, *pdutypes_fr, *statuscode_fr ;
-    GtkWidget  *bt_close;
-    GtkWidget  *bbox;
+       GtkWidget       *bt_close;
+       GtkWidget       *bbox;
        guint32          i;
        wsp_status_code_t *sc;
        
@@ -355,7 +355,7 @@ gtk_wspstat_init(char *optarg)
                sp->pdu_stats[i].packets=0;
        }
 
-    gtk_window_set_title(GTK_WINDOW(sp->win), title);
+       gtk_window_set_title(GTK_WINDOW(sp->win), title);
        g_free(title);
 
        /* container for the two frames */
index a61ad8646a32afbae0eb2c36767ea1415ada12b2..df36c6930b684c08a1dec983700b3d1a58368992 100644 (file)
@@ -49,7 +49,7 @@ typedef struct _http_stats_t {
 typedef struct _http_response_code_t {
        guint32          packets;               /* 3 */
        guint            response_code;         /* 404 */
-       gchar           *name;                  /* Not Found */
+       const gchar     *name;                  /* Not Found */
        httpstat_t      *sp;
 } http_response_code_t;
 
index 8a26136d1c67077547cd20e2511e457c8f5b8554..f52dfca00e973d8ff8099f28c178b5c3cbfd2ddf 100644 (file)
@@ -47,7 +47,7 @@ typedef struct _phs_t {
        struct _phs_t *parent;
        char *filter;
        int protocol;
-       char *proto_name;
+       const char *proto_name;
        guint32 frames;
        guint32 bytes;
 } phs_t;
index 423df3ef59f322c073b90300db1d317f32de5237..2aa6bdf8ae299c70e312afe83e4f023e1fed79d4 100644 (file)
@@ -55,7 +55,7 @@ typedef struct _sip_stats_t {
 typedef struct _sip_response_code_t {
        guint32          packets;               /* 3 */
        guint            response_code;         /* 404 */
-       gchar           *name;                  /* Not Found */
+       const gchar     *name;                  /* Not Found */
        sipstat_t       *sp;
 } sip_response_code_t;
 
index 3582179f890c8e262de5fc5e68fa6ded138bd76a..67805f62fb79effa49db0a6dbe1d22804d029474 100644 (file)
@@ -51,7 +51,7 @@ typedef struct _wsp_pdu_t {
 } wsp_pdu_t;
 /* used to keep track of RTT statistics */
 typedef struct _wsp_status_code_t {
-       gchar           *name;
+       const gchar     *name;
        guint32          packets;
 } wsp_status_code_t;
 /* used to keep track of the statictics for an entire program interface */