forked from osmocom/wireshark
Constify a bunch of structure members and function arguments, to squelch
compiler warnings. Clean up indentation. svn path=/trunk/; revision=14739
This commit is contained in:
parent
6f9d56ddd0
commit
76258fe8e3
|
@ -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);
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue