aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/ansi_a_stat.c4
-rw-r--r--gtk/ansi_map_stat.c4
-rw-r--r--gtk/bootp_stat.c32
-rw-r--r--gtk/dcerpc_stat.c14
-rw-r--r--gtk/fc_stat.c18
-rw-r--r--gtk/gsm_a_stat.c4
-rw-r--r--gtk/gsm_map_stat.c4
-rw-r--r--gtk/h225_counter.c24
-rw-r--r--gtk/h225_ras_srt.c26
-rw-r--r--gtk/hostlist_eth.c2
-rw-r--r--gtk/hostlist_fc.c4
-rw-r--r--gtk/hostlist_fddi.c4
-rw-r--r--gtk/hostlist_ip.c4
-rw-r--r--gtk/hostlist_ipx.c4
-rw-r--r--gtk/hostlist_jxta.c4
-rw-r--r--gtk/hostlist_table.h2
-rw-r--r--gtk/hostlist_tcpip.c4
-rw-r--r--gtk/hostlist_tr.c6
-rw-r--r--gtk/hostlist_udpip.c4
-rw-r--r--gtk/hostlist_wlan.c4
-rw-r--r--gtk/io_stat.c4
-rw-r--r--gtk/ldap_stat.c18
-rw-r--r--gtk/menu.c2
-rw-r--r--gtk/mgcp_stat.c30
-rw-r--r--gtk/mtp3_stat.c4
-rw-r--r--gtk/rpc_progs.c2
-rw-r--r--gtk/rpc_stat.c4
-rw-r--r--gtk/rtp_analysis.c2
-rw-r--r--gtk/rtp_stream.c2
-rw-r--r--gtk/sctp_chunk_stat.c14
-rw-r--r--gtk/sctp_stat.c2
-rw-r--r--gtk/sip_stat.c4
-rw-r--r--gtk/smb_stat.c18
-rw-r--r--gtk/stats_tree_stat.c2
-rw-r--r--gtk/summary_dlg.c2
-rw-r--r--gtk/toolbar.c2
-rw-r--r--gtk/voip_calls_dlg.c2
-rw-r--r--gtk/wsp_stat.c4
38 files changed, 140 insertions, 150 deletions
diff --git a/gtk/ansi_a_stat.c b/gtk/ansi_a_stat.c
index e1165c0206..df57744b46 100644
--- a/gtk/ansi_a_stat.c
+++ b/gtk/ansi_a_stat.c
@@ -366,11 +366,9 @@ ansi_a_stat_gtk_win_create(
*/
static void
ansi_a_stat_gtk_init(
- char *optarg)
+ const char *optarg _U_)
{
/* does not appear to be called */
-
- optarg = optarg;
}
diff --git a/gtk/ansi_map_stat.c b/gtk/ansi_map_stat.c
index 5a71cb6cef..03270be211 100644
--- a/gtk/ansi_map_stat.c
+++ b/gtk/ansi_map_stat.c
@@ -366,11 +366,9 @@ ansi_map_stat_gtk_win_create(
*/
static void
ansi_map_stat_gtk_init(
- char *optarg)
+ const char *optarg _U_)
{
/* does not appear to be called */
-
- optarg = optarg;
}
diff --git a/gtk/bootp_stat.c b/gtk/bootp_stat.c
index 261cd851cc..54df43e2cb 100644
--- a/gtk/bootp_stat.c
+++ b/gtk/bootp_stat.c
@@ -191,16 +191,16 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
/* When called, this function will create a new instance of gtk2-dhcpstat.
*/
static void
-dhcpstat_init(char *optarg)
+dhcpstat_init(const char *optarg)
{
dhcpstat_t *sp;
- char *filter=NULL;
+ const char *filter=NULL;
char *title=NULL;
GString *error_string;
GtkWidget *message_type_fr;
- GtkWidget *vbox;
- GtkWidget *bt_close;
- GtkWidget *bbox;
+ GtkWidget *vbox;
+ GtkWidget *bt_close;
+ GtkWidget *bbox;
if (strncmp (optarg, "bootp,stat,", 11) == 0){
filter=optarg+11;
@@ -222,9 +222,9 @@ dhcpstat_init(char *optarg)
sp->win = window_new(GTK_WINDOW_TOPLEVEL, title);
g_free(title);
- vbox = gtk_vbox_new(FALSE, 3);
+ vbox = gtk_vbox_new(FALSE, 3);
gtk_container_add(GTK_CONTAINER(sp->win), vbox);
- gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
/* Status Codes frame */
message_type_fr = gtk_frame_new("DHCP Message Type");
@@ -255,20 +255,20 @@ dhcpstat_init(char *optarg)
}
/* Button row. */
- bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL);
- gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
+ bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL);
+ gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
- bt_close = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
- window_set_cancel_button(sp->win, bt_close, window_cancel_button_cb);
+ bt_close = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
+ window_set_cancel_button(sp->win, bt_close, window_cancel_button_cb);
- SIGNAL_CONNECT(sp->win, "delete_event", window_delete_event_cb, NULL);
- SIGNAL_CONNECT(sp->win, "destroy", win_destroy_cb, sp);
+ SIGNAL_CONNECT(sp->win, "delete_event", window_delete_event_cb, NULL);
+ SIGNAL_CONNECT(sp->win, "destroy", win_destroy_cb, sp);
- gtk_widget_show_all(sp->win);
+ gtk_widget_show_all(sp->win);
- window_present(sp->win);
+ window_present(sp->win);
- cf_retap_packets(&cfile);
+ cf_retap_packets(&cfile);
}
static tap_dfilter_dlg dhcp_stat_dlg = {
diff --git a/gtk/dcerpc_stat.c b/gtk/dcerpc_stat.c
index fa04c4a8ba..9892f090e9 100644
--- a/gtk/dcerpc_stat.c
+++ b/gtk/dcerpc_stat.c
@@ -184,7 +184,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
/* When called, this function will create a new instance of gtk-dcerpcstat.
*/
static void
-gtk_dcerpcstat_init(char *optarg)
+gtk_dcerpcstat_init(const char *optarg)
{
rpcstat_t *rs;
guint32 i, max_procs;
@@ -201,7 +201,7 @@ gtk_dcerpcstat_init(char *optarg)
int major, minor;
guint16 ver;
int pos=0;
- char *filter=NULL;
+ const char *filter=NULL;
GString *error_string;
int hf_opnum;
@@ -323,15 +323,15 @@ gtk_dcerpcstat_init(char *optarg)
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
- window_set_cancel_button(rs->win, close_bt, window_cancel_button_cb);
+ window_set_cancel_button(rs->win, close_bt, window_cancel_button_cb);
- SIGNAL_CONNECT(rs->win, "delete_event", window_delete_event_cb, NULL);
+ SIGNAL_CONNECT(rs->win, "delete_event", window_delete_event_cb, NULL);
SIGNAL_CONNECT(rs->win, "destroy", win_destroy_cb, rs);
- gtk_widget_show_all(rs->win);
- window_present(rs->win);
+ gtk_widget_show_all(rs->win);
+ window_present(rs->win);
- cf_retap_packets(&cfile);
+ cf_retap_packets(&cfile);
}
diff --git a/gtk/fc_stat.c b/gtk/fc_stat.c
index 99378e72bd..04650a960e 100644
--- a/gtk/fc_stat.c
+++ b/gtk/fc_stat.c
@@ -128,17 +128,17 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
static void
-gtk_fcstat_init(char *optarg)
+gtk_fcstat_init(const char *optarg)
{
fcstat_t *fc;
- char *filter=NULL;
+ const char *filter=NULL;
GtkWidget *label;
char filter_string[256];
GString *error_string;
int i;
GtkWidget *vbox;
- GtkWidget *bbox;
- GtkWidget *close_bt;
+ GtkWidget *bbox;
+ GtkWidget *close_bt;
if(!strncmp(optarg,"fc,srt,",7)){
filter=optarg+7;
@@ -188,15 +188,15 @@ gtk_fcstat_init(char *optarg)
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
- window_set_cancel_button(fc->win, close_bt, window_cancel_button_cb);
+ window_set_cancel_button(fc->win, close_bt, window_cancel_button_cb);
- SIGNAL_CONNECT(fc->win, "delete_event", window_delete_event_cb, NULL);
- SIGNAL_CONNECT(fc->win, "destroy", win_destroy_cb, fc);
+ SIGNAL_CONNECT(fc->win, "delete_event", window_delete_event_cb, NULL);
+ SIGNAL_CONNECT(fc->win, "destroy", win_destroy_cb, fc);
gtk_widget_show_all(fc->win);
- window_present(fc->win);
+ window_present(fc->win);
- cf_retap_packets(&cfile);
+ cf_retap_packets(&cfile);
}
diff --git a/gtk/gsm_a_stat.c b/gtk/gsm_a_stat.c
index e34b4347a2..9a13081092 100644
--- a/gtk/gsm_a_stat.c
+++ b/gtk/gsm_a_stat.c
@@ -453,11 +453,9 @@ gsm_a_stat_gtk_win_create(
*/
static void
gsm_a_stat_gtk_init(
- char *optarg)
+ const char *optarg _U_)
{
/* does not appear to be called */
-
- optarg = optarg;
}
diff --git a/gtk/gsm_map_stat.c b/gtk/gsm_map_stat.c
index 2f8221126e..b7ef591b3d 100644
--- a/gtk/gsm_map_stat.c
+++ b/gtk/gsm_map_stat.c
@@ -396,11 +396,9 @@ gsm_map_stat_gtk_win_create(
*/
static void
gsm_map_stat_gtk_init(
- char *optarg)
+ const char *optarg _U_)
{
/* does not appear to be called */
-
- optarg = optarg;
}
diff --git a/gtk/h225_counter.c b/gtk/h225_counter.c
index e6d1c6095d..c7cb4858f5 100644
--- a/gtk/h225_counter.c
+++ b/gtk/h225_counter.c
@@ -54,7 +54,7 @@
#include "ui_util.h"
-static void gtk_h225counter_init(char *optarg);
+static void gtk_h225counter_init(const char *optarg);
static tap_dfilter_dlg h225_counter_dlg = {
"H.225 Messages and Message Reasons",
@@ -497,23 +497,23 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
}
-static const gchar *titles[]={"Message Type or Reason",
+static const gchar *titles[]={
+ "Message Type or Reason",
"Count" };
static void
-gtk_h225counter_init(char *optarg)
+gtk_h225counter_init(const char *optarg)
{
h225counter_t *hs;
- char *filter=NULL;
+ const char *filter=NULL;
GString *error_string;
- GtkWidget *bbox;
- GtkWidget *close_bt;
+ GtkWidget *bbox;
+ GtkWidget *close_bt;
if(strncmp(optarg,"h225,counter,",13) == 0){
filter=optarg+13;
} else {
- filter=g_malloc(1);
- *filter='\0';
+ filter="";
}
hs=g_malloc(sizeof(h225counter_t));
@@ -548,13 +548,13 @@ gtk_h225counter_init(char *optarg)
gtk_box_pack_end(GTK_BOX(hs->vbox), bbox, FALSE, FALSE, 0);
close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
- window_set_cancel_button(hs->win, close_bt, window_cancel_button_cb);
+ window_set_cancel_button(hs->win, close_bt, window_cancel_button_cb);
- SIGNAL_CONNECT(hs->win, "delete_event", window_delete_event_cb, NULL);
- SIGNAL_CONNECT(hs->win, "destroy", win_destroy_cb, hs);
+ SIGNAL_CONNECT(hs->win, "delete_event", window_delete_event_cb, NULL);
+ SIGNAL_CONNECT(hs->win, "destroy", win_destroy_cb, hs);
gtk_widget_show_all(hs->win);
- window_present(hs->win);
+ window_present(hs->win);
cf_retap_packets(&cfile);
}
diff --git a/gtk/h225_ras_srt.c b/gtk/h225_ras_srt.c
index 57b9399352..92a6da1c3e 100644
--- a/gtk/h225_ras_srt.c
+++ b/gtk/h225_ras_srt.c
@@ -55,7 +55,7 @@
#include "ui_util.h"
-static void gtk_h225rassrt_init(char *optarg);
+static void gtk_h225rassrt_init(const char *optarg);
static tap_dfilter_dlg h225_rassrt_dlg = {
"H.225 RAS Service Response Time",
@@ -268,7 +268,8 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
}
-static const gchar *titles[]={"RAS-Type",
+static const gchar *titles[]={
+ "RAS-Type",
"Measurements",
"Min RTT",
"Max RTT",
@@ -281,19 +282,18 @@ static const gchar *titles[]={"RAS-Type",
"Repeated Responses" };
static void
-gtk_h225rassrt_init(char *optarg)
+gtk_h225rassrt_init(const char *optarg)
{
h225rassrt_t *hs;
- char *filter=NULL;
+ const char *filter=NULL;
GString *error_string;
- GtkWidget *bbox;
- GtkWidget *close_bt;
+ GtkWidget *bbox;
+ GtkWidget *close_bt;
if(strncmp(optarg,"h225,srt,",9) == 0){
filter=optarg+9;
} else {
- filter=g_malloc(1);
- *filter='\0';
+ filter="";
}
hs=g_malloc(sizeof(h225rassrt_t));
@@ -328,15 +328,15 @@ gtk_h225rassrt_init(char *optarg)
gtk_box_pack_end(GTK_BOX(hs->vbox), bbox, FALSE, FALSE, 0);
close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
- window_set_cancel_button(hs->win, close_bt, window_cancel_button_cb);
+ window_set_cancel_button(hs->win, close_bt, window_cancel_button_cb);
- SIGNAL_CONNECT(hs->win, "delete_event", window_delete_event_cb, NULL);
- SIGNAL_CONNECT(hs->win, "destroy", win_destroy_cb, hs);
+ SIGNAL_CONNECT(hs->win, "delete_event", window_delete_event_cb, NULL);
+ SIGNAL_CONNECT(hs->win, "destroy", win_destroy_cb, hs);
gtk_widget_show_all(hs->win);
- window_present(hs->win);
+ window_present(hs->win);
- cf_retap_packets(&cfile);
+ cf_retap_packets(&cfile);
}
void
diff --git a/gtk/hostlist_eth.c b/gtk/hostlist_eth.c
index 8a97687401..7e61370a42 100644
--- a/gtk/hostlist_eth.c
+++ b/gtk/hostlist_eth.c
@@ -60,7 +60,7 @@ eth_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons
static void
gtk_eth_hostlist_init(const char *optarg)
{
- char *filter=NULL;
+ const char *filter=NULL;
if(!strncmp(optarg,"hosts,eth,",10)){
filter=optarg+10;
diff --git a/gtk/hostlist_fc.c b/gtk/hostlist_fc.c
index 886e58a7b3..8aab16a808 100644
--- a/gtk/hostlist_fc.c
+++ b/gtk/hostlist_fc.c
@@ -58,9 +58,9 @@ fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const
static void
-gtk_fc_hostlist_init(char *optarg)
+gtk_fc_hostlist_init(const char *optarg)
{
- char *filter=NULL;
+ const char *filter=NULL;
if(!strncmp(optarg,"hosts,fc,",9)){
filter=optarg+9;
diff --git a/gtk/hostlist_fddi.c b/gtk/hostlist_fddi.c
index 81198fde01..6df39c6048 100644
--- a/gtk/hostlist_fddi.c
+++ b/gtk/hostlist_fddi.c
@@ -58,9 +58,9 @@ fddi_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con
static void
-gtk_fddi_hostlist_init(char *optarg)
+gtk_fddi_hostlist_init(const char *optarg)
{
- char *filter=NULL;
+ const char *filter=NULL;
if(!strncmp(optarg,"hosts,fddi,",11)){
filter=optarg+11;
diff --git a/gtk/hostlist_ip.c b/gtk/hostlist_ip.c
index 57f456cd6c..9ed2cf7190 100644
--- a/gtk/hostlist_ip.c
+++ b/gtk/hostlist_ip.c
@@ -57,9 +57,9 @@ ip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const
}
static void
-gtk_ip_hostlist_init(char *optarg)
+gtk_ip_hostlist_init(const char *optarg)
{
- char *filter=NULL;
+ const char *filter=NULL;
if(!strncmp(optarg,"hosts,ip,",9)){
filter=optarg+9;
diff --git a/gtk/hostlist_ipx.c b/gtk/hostlist_ipx.c
index b48930af21..04a54f1cfc 100644
--- a/gtk/hostlist_ipx.c
+++ b/gtk/hostlist_ipx.c
@@ -58,9 +58,9 @@ ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons
static void
-gtk_ipx_hostlist_init(char *optarg)
+gtk_ipx_hostlist_init(const char *optarg)
{
- char *filter=NULL;
+ const char *filter=NULL;
if(!strncmp(optarg,"hosts,ipx,",10)){
filter=optarg+10;
diff --git a/gtk/hostlist_jxta.c b/gtk/hostlist_jxta.c
index 10017a36a4..a31699cc29 100644
--- a/gtk/hostlist_jxta.c
+++ b/gtk/hostlist_jxta.c
@@ -55,9 +55,9 @@ jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
}
static void
-gtk_jxta_hostlist_init(char *optarg)
+gtk_jxta_hostlist_init(const char *optarg)
{
- char *filter=NULL;
+ const char *filter=NULL;
if(!strncmp(optarg,"hosts,jxta,",11)){
filter=optarg+11;
diff --git a/gtk/hostlist_table.h b/gtk/hostlist_table.h
index 17f78e7285..99577ef080 100644
--- a/gtk/hostlist_table.h
+++ b/gtk/hostlist_table.h
@@ -44,7 +44,7 @@ typedef struct _hostlist_talker_t {
/** Hostlist widget */
typedef struct _hostlist_table {
- char *name; /**< the name of the table */
+ const char *name; /**< the name of the table */
GtkWidget *win; /**< GTK window */
GtkWidget *page_lb; /**< label */
GtkWidget *scrolled_window; /**< the scrolled window */
diff --git a/gtk/hostlist_tcpip.c b/gtk/hostlist_tcpip.c
index 72f28fc9ca..f84958db3f 100644
--- a/gtk/hostlist_tcpip.c
+++ b/gtk/hostlist_tcpip.c
@@ -58,9 +58,9 @@ tcpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co
static void
-gtk_tcpip_hostlist_init(char *optarg)
+gtk_tcpip_hostlist_init(const char *optarg)
{
- char *filter=NULL;
+ const char *filter=NULL;
if(!strncmp(optarg,"endpoints,tcp,",14)){
filter=optarg+14;
diff --git a/gtk/hostlist_tr.c b/gtk/hostlist_tr.c
index af21ca6ca3..cb2021ef9d 100644
--- a/gtk/hostlist_tr.c
+++ b/gtk/hostlist_tr.c
@@ -58,9 +58,9 @@ tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const
static void
-gtk_tr_hostlist_init(char *optarg)
+gtk_tr_hostlist_init(const char *optarg)
{
- char *filter=NULL;
+ const char *filter=NULL;
if(!strncmp(optarg,"hosts,tr,",9)){
filter=optarg+9;
@@ -88,5 +88,5 @@ register_tap_listener_tr_hostlist(void)
register_tap_menu_item("Token Ring", REGISTER_TAP_GROUP_ENDPOINT_LIST,
gtk_tr_hostlist_cb, NULL, NULL, NULL);
- register_hostlist_table(TRUE, "Token Ring", "tr", NULL /*filter*/, tr_hostlist_packet);
+ register_hostlist_table(TRUE, "Token Ring", "tr", NULL /*filter*/, tr_hostlist_packet);
}
diff --git a/gtk/hostlist_udpip.c b/gtk/hostlist_udpip.c
index 6d86a16ba7..7565cf0cbc 100644
--- a/gtk/hostlist_udpip.c
+++ b/gtk/hostlist_udpip.c
@@ -58,9 +58,9 @@ udpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co
static void
-gtk_udpip_hostlist_init(char *optarg)
+gtk_udpip_hostlist_init(const char *optarg)
{
- char *filter=NULL;
+ const char *filter=NULL;
if(!strncmp(optarg,"endpoints,udp,",14)){
filter=optarg+14;
diff --git a/gtk/hostlist_wlan.c b/gtk/hostlist_wlan.c
index 07de604544..65e0fe338b 100644
--- a/gtk/hostlist_wlan.c
+++ b/gtk/hostlist_wlan.c
@@ -56,9 +56,9 @@ wlan_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con
}
static void
-gtk_wlan_hostlist_init(char *optarg)
+gtk_wlan_hostlist_init(const char *optarg)
{
- char *filter=NULL;
+ const char *filter=NULL;
if(!strncmp(optarg,"hosts,wlan,",11)){
filter=optarg+11;
diff --git a/gtk/io_stat.c b/gtk/io_stat.c
index 1f24be9512..d1f5d6fc0d 100644
--- a/gtk/io_stat.c
+++ b/gtk/io_stat.c
@@ -1048,7 +1048,7 @@ disable_graph(io_stat_graph_t *gio)
}
static void
-gtk_iostat_init(char *optarg _U_)
+gtk_iostat_init(const char *optarg _U_)
{
io_stat_t *io;
int i=0;
@@ -1071,7 +1071,7 @@ gtk_iostat_init(char *optarg _U_)
io->scrollbar_adjustment=NULL;
io->pixmap_width=500;
io->pixmap_height=200;
- io->pixels_per_tick=pixels_per_tick[DEFAULT_PIXELS_PER_TICK];
+ io->pixels_per_tick=pixels_per_tick[DEFAULT_PIXELS_PER_TICK];
io->max_y_units=AUTO_MAX_YSCALE;
io->count_type=0;
io->last_interval=0xffffffff;
diff --git a/gtk/ldap_stat.c b/gtk/ldap_stat.c
index da6149ef4b..6f49002d1f 100644
--- a/gtk/ldap_stat.c
+++ b/gtk/ldap_stat.c
@@ -143,16 +143,16 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
static void
-gtk_ldapstat_init(char *optarg)
+gtk_ldapstat_init(const char *optarg)
{
ldapstat_t *ldap;
- char *filter=NULL;
+ const char *filter=NULL;
GtkWidget *label;
char filter_string[256];
GString *error_string;
GtkWidget *vbox;
- GtkWidget *bbox;
- GtkWidget *close_bt;
+ GtkWidget *bbox;
+ GtkWidget *close_bt;
if(!strncmp(optarg,"ldap,srt,",9)){
filter=optarg+9;
@@ -223,15 +223,15 @@ gtk_ldapstat_init(char *optarg)
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
- window_set_cancel_button(ldap->win, close_bt, window_cancel_button_cb);
+ window_set_cancel_button(ldap->win, close_bt, window_cancel_button_cb);
- SIGNAL_CONNECT(ldap->win, "delete_event", window_delete_event_cb, NULL);
+ SIGNAL_CONNECT(ldap->win, "delete_event", window_delete_event_cb, NULL);
SIGNAL_CONNECT(ldap->win, "destroy", win_destroy_cb, ldap);
- gtk_widget_show_all(ldap->win);
- window_present(ldap->win);
+ gtk_widget_show_all(ldap->win);
+ window_present(ldap->win);
- cf_retap_packets(&cfile);
+ cf_retap_packets(&cfile);
}
diff --git a/gtk/menu.c b/gtk/menu.c
index d722b28a31..8920d0c3f5 100644
--- a/gtk/menu.c
+++ b/gtk/menu.c
@@ -658,7 +658,7 @@ register_tap_menu_item(
{
/*static const char toolspath[] = "/Statistics/";*/
const char *toolspath;
- char *p;
+ const char *p;
char *menupath;
size_t menupathlen;
menu_item_t *child;
diff --git a/gtk/mgcp_stat.c b/gtk/mgcp_stat.c
index 9775071601..6ce3a3cbcd 100644
--- a/gtk/mgcp_stat.c
+++ b/gtk/mgcp_stat.c
@@ -247,7 +247,8 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
g_free(ms);
}
-static gchar *titles[]={"Type",
+static const gchar *titles[]={
+ "Type",
"Messages",
"Min SRT",
"Max SRT",
@@ -256,19 +257,18 @@ static gchar *titles[]={"Type",
"Max in Frame" };
void
-gtk_mgcpstat_init(char *optarg)
+gtk_mgcpstat_init(const char *optarg)
{
mgcpstat_t *ms;
- char *filter=NULL;
+ const char *filter=NULL;
GString *error_string;
- GtkWidget *bt_close;
- GtkWidget *bbox;
+ GtkWidget *bt_close;
+ GtkWidget *bbox;
if(strncmp(optarg,"mgcp,srt,",9) == 0){
filter=optarg+9;
} else {
- filter=g_malloc(1);
- *filter='\0';
+ filter="";
}
ms=g_malloc(sizeof(mgcpstat_t));
@@ -299,19 +299,19 @@ gtk_mgcpstat_init(char *optarg)
}
/* Button row. */
- bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL);
- gtk_box_pack_start(GTK_BOX(ms->vbox), bbox, FALSE, FALSE, 0);
+ bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL);
+ gtk_box_pack_start(GTK_BOX(ms->vbox), bbox, FALSE, FALSE, 0);
- bt_close = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
- window_set_cancel_button(ms->win, bt_close, window_cancel_button_cb);
+ bt_close = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
+ window_set_cancel_button(ms->win, bt_close, window_cancel_button_cb);
- SIGNAL_CONNECT(ms->win, "delete_event", window_delete_event_cb, NULL);
+ SIGNAL_CONNECT(ms->win, "delete_event", window_delete_event_cb, NULL);
SIGNAL_CONNECT(ms->win, "destroy", win_destroy_cb, ms);
- gtk_widget_show_all(ms->win);
- window_present(ms->win);
+ gtk_widget_show_all(ms->win);
+ window_present(ms->win);
- cf_retap_packets(&cfile);
+ cf_retap_packets(&cfile);
}
static tap_dfilter_dlg mgcp_srt_dlg = {
diff --git a/gtk/mtp3_stat.c b/gtk/mtp3_stat.c
index ce6e96b1b4..68c768ba65 100644
--- a/gtk/mtp3_stat.c
+++ b/gtk/mtp3_stat.c
@@ -412,11 +412,9 @@ mtp3_stat_gtk_win_create(
*/
static void
mtp3_stat_gtk_init(
- char *optarg)
+ const char *optarg _U_)
{
/* does not appear to be called */
-
- optarg = optarg;
}
diff --git a/gtk/rpc_progs.c b/gtk/rpc_progs.c
index 9d674deb18..d335496b7c 100644
--- a/gtk/rpc_progs.c
+++ b/gtk/rpc_progs.c
@@ -331,7 +331,7 @@ win_destroy_cb(void *dummy _U_, gpointer data _U_)
/* When called, this function will start rpcprogs
*/
void
-gtk_rpcprogs_init(char *optarg _U_)
+gtk_rpcprogs_init(const char *optarg _U_)
{
char *title_string;
GtkWidget *vbox;
diff --git a/gtk/rpc_stat.c b/gtk/rpc_stat.c
index 28ecd7ab0a..88d26caac1 100644
--- a/gtk/rpc_stat.c
+++ b/gtk/rpc_stat.c
@@ -215,7 +215,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
/* When called, this function will create a new instance of gtk2-rpcstat.
*/
static void
-gtk_rpcstat_init(char *optarg)
+gtk_rpcstat_init(const char *optarg)
{
rpcstat_t *rs;
guint32 i;
@@ -227,7 +227,7 @@ gtk_rpcstat_init(char *optarg)
GtkWidget *bbox;
GtkWidget *close_bt;
int program, version, pos;
- char *filter=NULL;
+ const char *filter=NULL;
GString *error_string;
int hf_index;
header_field_info *hfi;
diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c
index 97a7a3f589..17712eb061 100644
--- a/gtk/rtp_analysis.c
+++ b/gtk/rtp_analysis.c
@@ -3641,7 +3641,7 @@ void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_)
/****************************************************************************/
static void
-rtp_analysis_init(char *dummy _U_)
+rtp_analysis_init(const char *dummy _U_)
{
rtp_analysis_cb(NULL, NULL);
}
diff --git a/gtk/rtp_stream.c b/gtk/rtp_stream.c
index 4ddb0b9c70..ea9cf6e164 100644
--- a/gtk/rtp_stream.c
+++ b/gtk/rtp_stream.c
@@ -407,7 +407,7 @@ const rtpstream_tapinfo_t* rtpstream_get_info(void)
/****************************************************************************/
static void
-rtpstream_init_tap(char *dummy _U_)
+rtpstream_init_tap(const char *dummy _U_)
{
/* XXX: never called? */
}
diff --git a/gtk/sctp_chunk_stat.c b/gtk/sctp_chunk_stat.c
index 68bd56d172..0f7e4268bb 100644
--- a/gtk/sctp_chunk_stat.c
+++ b/gtk/sctp_chunk_stat.c
@@ -2,7 +2,7 @@
* SCTP chunk counter for ethereal
* Copyright 2005 Oleg Terletsky oleg.terletsky@comverse.com
*
- * $Id:$
+ * $Id$
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -55,7 +55,7 @@
#include "ui_util.h"
-static void sctpstat_init(char *optarg);
+static void sctpstat_init(const char *optarg);
static tap_dfilter_dlg sctp_stat_dlg = {
"SCTP Statistics",
@@ -263,7 +263,8 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
}
-static gchar *titles[]={"Source IP",
+static const gchar *titles[]={
+ "Source IP",
"Source Port",
"Dest IP",
"Dest Port",
@@ -279,10 +280,10 @@ static gchar *titles[]={"Source IP",
"ERROR" };
static void
-sctpstat_init(char *optarg)
+sctpstat_init(const char *optarg)
{
sctpstat_t *hs;
- char *filter=NULL;
+ const char *filter=NULL;
GString *error_string;
GtkWidget *bbox;
GtkWidget *close_bt;
@@ -290,8 +291,7 @@ sctpstat_init(char *optarg)
if(strncmp(optarg,"sctp,stat,",11) == 0){
filter=optarg+11;
} else {
- filter=g_malloc(1);
- *filter='\0';
+ filter="";
}
hs=g_malloc(sizeof(sctpstat_t));
diff --git a/gtk/sctp_stat.c b/gtk/sctp_stat.c
index 2b2dc3b54d..3dbc2c89f2 100644
--- a/gtk/sctp_stat.c
+++ b/gtk/sctp_stat.c
@@ -1445,7 +1445,7 @@ const sctp_allassocs_info_t* sctp_stat_get_info(void)
static void
-gtk_sctpstat_init(char *dummy _U_)
+gtk_sctpstat_init(const char *dummy _U_)
{
}
diff --git a/gtk/sip_stat.c b/gtk/sip_stat.c
index 3f5dbc77d6..cff8020079 100644
--- a/gtk/sip_stat.c
+++ b/gtk/sip_stat.c
@@ -498,10 +498,10 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
/* Create a new instance of gtk_sipstat. */
static void
-gtk_sipstat_init(char *optarg)
+gtk_sipstat_init(const char *optarg)
{
sipstat_t *sp;
- char *filter = NULL;
+ const char *filter = NULL;
GString *error_string;
char *title = NULL;
GtkWidget *main_vb, *separator,
diff --git a/gtk/smb_stat.c b/gtk/smb_stat.c
index 308a965146..46fa1d7967 100644
--- a/gtk/smb_stat.c
+++ b/gtk/smb_stat.c
@@ -150,17 +150,17 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
static void
-gtk_smbstat_init(char *optarg)
+gtk_smbstat_init(const char *optarg)
{
smbstat_t *ss;
- char *filter=NULL;
+ const char *filter=NULL;
GtkWidget *label;
char filter_string[256];
GString *error_string;
int i;
GtkWidget *vbox;
- GtkWidget *bbox;
- GtkWidget *close_bt;
+ GtkWidget *bbox;
+ GtkWidget *close_bt;
if(!strncmp(optarg,"smb,srt,",8)){
filter=optarg+8;
@@ -226,15 +226,15 @@ gtk_smbstat_init(char *optarg)
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
- window_set_cancel_button(ss->win, close_bt, window_cancel_button_cb);
+ window_set_cancel_button(ss->win, close_bt, window_cancel_button_cb);
- SIGNAL_CONNECT(ss->win, "delete_event", window_delete_event_cb, NULL);
+ SIGNAL_CONNECT(ss->win, "delete_event", window_delete_event_cb, NULL);
SIGNAL_CONNECT(ss->win, "destroy", win_destroy_cb, ss);
- gtk_widget_show_all(ss->win);
- window_present(ss->win);
+ gtk_widget_show_all(ss->win);
+ window_present(ss->win);
- cf_retap_packets(&cfile);
+ cf_retap_packets(&cfile);
}
diff --git a/gtk/stats_tree_stat.c b/gtk/stats_tree_stat.c
index 07394ebe54..ebde04b424 100644
--- a/gtk/stats_tree_stat.c
+++ b/gtk/stats_tree_stat.c
@@ -196,7 +196,7 @@ static void free_gtk_tree(GtkWindow *win _U_, stats_tree *st)
/* initializes the stats_tree window */
-static void init_gtk_tree(char* optarg) {
+static void init_gtk_tree(const char* optarg) {
guint8* abbr = stats_tree_get_abbr(optarg);
stats_tree* st = NULL;
stats_tree_cfg* cfg = NULL;
diff --git a/gtk/summary_dlg.c b/gtk/summary_dlg.c
index bb38426407..079862ed9d 100644
--- a/gtk/summary_dlg.c
+++ b/gtk/summary_dlg.c
@@ -97,7 +97,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_)
*main_vb, *bbox, *close_bt, *help_bt;
GtkWidget *table;
GtkWidget *list;
- char *titles[] = { "Traffic", "Captured", "Displayed" };
+ static const char *titles[] = { "Traffic", "Captured", "Displayed" };
gchar string_buff[SUM_STR_MAX];
gchar string_buff2[SUM_STR_MAX];
diff --git a/gtk/toolbar.c b/gtk/toolbar.c
index 06abbd3d5c..77a8139c67 100644
--- a/gtk/toolbar.c
+++ b/gtk/toolbar.c
@@ -160,7 +160,7 @@ static GtkWidget *color_display_button, *prefs_button, *help_button;
#if GTK_MAJOR_VERSION >= 2
typedef struct stock_pixmap_tag{
const char * name;
- char ** xpm_data;
+ const char ** xpm_data;
} stock_pixmap_t;
/* generate application specific stock items */
diff --git a/gtk/voip_calls_dlg.c b/gtk/voip_calls_dlg.c
index 51c3c1fdb5..a24adef296 100644
--- a/gtk/voip_calls_dlg.c
+++ b/gtk/voip_calls_dlg.c
@@ -741,7 +741,7 @@ void voip_calls_dlg_reset(void *ptr _U_)
/* init function for tap */
static void
-voip_calls_init_tap(char *dummy _U_)
+voip_calls_init_tap(const char *dummy _U_)
{
gint c;
gchar *data[NUM_COLS];
diff --git a/gtk/wsp_stat.c b/gtk/wsp_stat.c
index 06810d7e47..d3e713c032 100644
--- a/gtk/wsp_stat.c
+++ b/gtk/wsp_stat.c
@@ -304,10 +304,10 @@ wsp_init_table(wspstat_t *sp)
/* When called, this function will create a new instance of gtk2-wspstat.
*/
static void
-gtk_wspstat_init(char *optarg)
+gtk_wspstat_init(const char *optarg)
{
wspstat_t *sp;
- char *filter=NULL;
+ const char *filter=NULL;
char *title=NULL;
GString *error_string;
GtkWidget *main_vb, *pdutypes_fr, *statuscode_fr ;