diff options
author | Jörg Mayer <jmayer@loplof.de> | 2005-08-06 14:03:14 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2005-08-06 14:03:14 +0000 |
commit | 62b7cc3043f63836ab26d866ba5885a11c409ebf (patch) | |
tree | 3fa68dbd08f38db924425656b41d4a8fec6c7fff | |
parent | fd79f5eb9c0b67692734eb2f30a8c3742f918ccd (diff) |
Last set of char -> const char trivial warning fixes.
svn path=/trunk/; revision=15244
-rw-r--r-- | capture_loop.c | 2 | ||||
-rw-r--r-- | capture_sync.c | 12 | ||||
-rw-r--r-- | file.c | 20 | ||||
-rw-r--r-- | filters.c | 10 | ||||
-rw-r--r-- | filters.h | 4 | ||||
-rw-r--r-- | gtk/io_stat.c | 12 | ||||
-rw-r--r-- | gtk/mtp3_stat.c | 4 | ||||
-rw-r--r-- | gtk/mtp3_summary.c | 4 | ||||
-rw-r--r-- | gtk/progress_dlg.c | 2 | ||||
-rw-r--r-- | gtk/rtp_analysis.c | 18 | ||||
-rw-r--r-- | gtk/sctp_chunk_stat_dlg.c | 10 | ||||
-rw-r--r-- | gtk/sctp_stat_dlg.c | 6 | ||||
-rw-r--r-- | gtk/tcp_graph.c | 30 | ||||
-rw-r--r-- | gtk/voip_calls_dlg.c | 4 | ||||
-rw-r--r-- | progress_dlg.h | 2 | ||||
-rw-r--r-- | tap-iostat.c | 8 | ||||
-rw-r--r-- | util.c | 4 | ||||
-rw-r--r-- | util.h | 2 |
18 files changed, 78 insertions, 76 deletions
diff --git a/capture_loop.c b/capture_loop.c index 8b6e82a0ca..8421e73a32 100644 --- a/capture_loop.c +++ b/capture_loop.c @@ -523,7 +523,7 @@ static int capture_loop_open_input(capture_options *capture_opts, loop_data *ld, WSADATA wsaData; #else static const char ppamsg[] = "can't find PPA for "; - char *libpcap_warn; + const char *libpcap_warn; #endif diff --git a/capture_sync.c b/capture_sync.c index 9c177afe67..1d1750b09f 100644 --- a/capture_sync.c +++ b/capture_sync.c @@ -104,7 +104,7 @@ #ifndef _WIN32 -static char *sync_pipe_signame(int); +static const char *sync_pipe_signame(int); #endif @@ -280,8 +280,8 @@ signal_pipe_capquit_to_child(capture_options *capture_opts) /* Add a string pointer to a NULL-terminated array of string pointers. */ -static char ** -sync_pipe_add_arg(char **args, int *argc, char *arg) +static const char ** +sync_pipe_add_arg(const char **args, int *argc, const char *arg) { /* Grow the array; "*argc" currently contains the number of string pointers, *not* counting the NULL pointer at the end, so we have @@ -344,7 +344,7 @@ sync_pipe_start(capture_options *capture_opts) { char errmsg[1024+1]; #endif int argc; - char **argv; + const char **argv; enum PIPES { PIPE_READ, PIPE_WRITE }; /* Constants 0 and 1 for PIPE_READ and PIPE_WRITE */ int sync_pipe[2]; /* pipe used to send messages from child to parent */ @@ -727,10 +727,10 @@ sync_pipe_wait_for_child(capture_options *capture_opts) #ifndef _WIN32 /* convert signal to corresponding name */ -static char * +static const char * sync_pipe_signame(int sig) { - char *sigmsg; + const char *sigmsg; static char sigmsg_buf[6+1+3+1]; switch (sig) { @@ -126,7 +126,7 @@ static gboolean find_packet(capture_file *cf, static void cf_open_failure_alert_box(const char *filename, int err, gchar *err_info, gboolean for_writing, int file_type); -static char *file_rename_error_message(int err); +static const char *file_rename_error_message(int err); static void cf_write_failure_alert_box(const char *filename, int err); static void cf_close_failure_alert_box(const char *filename, int err); static gboolean copy_binary_file(const char *from_filename, const char *to_filename); @@ -331,8 +331,8 @@ cf_read(capture_file *cf) int err; gchar *err_info; const gchar *name_ptr; - gchar *load_msg, *load_fmt = "%s"; - char *errmsg; + const gchar *load_msg, *load_fmt = "%s"; + const char *errmsg; char errmsg_errno[1024+1]; gchar err_str[2048+1]; long data_offset; @@ -933,7 +933,7 @@ cf_merge_files(char **out_filenamep, int in_file_count, int i; char errmsg_errno[1024+1]; gchar err_str[2048+1]; - char *errmsg; + const char *errmsg; gboolean got_read_error = FALSE, got_write_error = FALSE; long data_offset; progdlg_t *progbar = NULL; @@ -1127,9 +1127,9 @@ cf_merge_files(char **out_filenamep, int in_file_count, cf_status_t cf_filter_packets(capture_file *cf, gchar *dftext, gboolean force) { - dfilter_t *dfcode; - char *filter_new = dftext ? dftext : ""; - char *filter_old = cf->dfilter ? cf->dfilter : ""; + dfilter_t *dfcode; + const char *filter_new = dftext ? dftext : ""; + const char *filter_old = cf->dfilter ? cf->dfilter : ""; /* if new filter equals old one, do nothing unless told to do so */ if (!force && strcmp(filter_new, filter_old) == 0) { @@ -3084,7 +3084,7 @@ cf_save(capture_file *cf, const char *fname, packet_range_t *range, guint save_f wtap_dumper *pdh; save_callback_args_t callback_args; - cf_callback_invoke(cf_cb_file_safe_started, (gpointer) fname); + cf_callback_invoke(cf_cb_file_safe_started, fname); /* don't write over an existing file. */ /* this should've been already checked by our caller, just to be sure... */ @@ -3368,10 +3368,10 @@ cf_open_failure_alert_box(const char *filename, int err, gchar *err_info, } } -static char * +static const char * file_rename_error_message(int err) { - char *errmsg; + const char *errmsg; static char errmsg_errno[1024+1]; switch (err) { @@ -78,10 +78,11 @@ static GList *display_filters = NULL; #define INIT_BUF_SIZE 128 void -read_filter_list(filter_list_type_t list, char **pref_path_return, +read_filter_list(filter_list_type_t list, const char **pref_path_return, int *errno_return) { - char *ff_path, *ff_name; + const char *ff_name; + char *ff_path; FILE *ff; GList **flp; GList *fl_ent; @@ -422,10 +423,11 @@ remove_from_filter_list(filter_list_type_t list, GList *fl_entry) * and "*errno_return" is set to the error. */ void -save_filter_list(filter_list_type_t list, char **pref_path_return, +save_filter_list(filter_list_type_t list, const char **pref_path_return, int *errno_return) { - gchar *ff_path, *ff_path_new, *ff_name; + const gchar *ff_name; + gchar *ff_path, *ff_path_new; GList *fl; GList *flp; filter_def *filt; @@ -47,7 +47,7 @@ typedef struct { * the file we tried to read - it should be freed by our caller - * and "*errno_return" is set to the error. */ -void read_filter_list(filter_list_type_t list, char **pref_path_return, +void read_filter_list(filter_list_type_t list, const char **pref_path_return, int *errno_return); /* @@ -75,5 +75,5 @@ void remove_from_filter_list(filter_list_type_t list, GList *fl_entry); * the file we tried to read - it should be freed by our caller - * and "*errno_return" is set to the error. */ -void save_filter_list(filter_list_type_t list, char **pref_path_return, +void save_filter_list(filter_list_type_t list, const char **pref_path_return, int *errno_return); diff --git a/gtk/io_stat.c b/gtk/io_stat.c index d1f5d6fc0d..c75b71c709 100644 --- a/gtk/io_stat.c +++ b/gtk/io_stat.c @@ -73,7 +73,7 @@ static guint32 pixels_per_tick[MAX_PIXELS_PER_TICK] = {1, 2, 5, 10}; #define PLOT_STYLE_IMPULSE 1 #define PLOT_STYLE_FILLED_BAR 2 #define MAX_PLOT_STYLES 3 -static char *plot_style_name[MAX_PLOT_STYLES] = { +static const char *plot_style_name[MAX_PLOT_STYLES] = { "Line", "Impulse", "FBar", @@ -84,12 +84,12 @@ static char *plot_style_name[MAX_PLOT_STYLES] = { #define COUNT_TYPE_BYTES 1 #define COUNT_TYPE_ADVANCED 2 #define MAX_COUNT_TYPES 3 -static char *count_type_names[MAX_COUNT_TYPES] = {"Packets/Tick", "Bytes/Tick", "Advanced..."}; +static const char *count_type_names[MAX_COUNT_TYPES] = {"Packets/Tick", "Bytes/Tick", "Advanced..."}; /* unit is in ms */ #define MAX_TICK_VALUES 5 #define DEFAULT_TICK_VALUE 3 -static guint tick_interval_values[MAX_TICK_VALUES] = { 1, 10, 100, 1000, 10000 }; +static const guint tick_interval_values[MAX_TICK_VALUES] = { 1, 10, 100, 1000, 10000 }; #define CALC_TYPE_SUM 0 #define CALC_TYPE_COUNT 1 @@ -98,7 +98,7 @@ static guint tick_interval_values[MAX_TICK_VALUES] = { 1, 10, 100, 1000, 10000 } #define CALC_TYPE_AVG 4 #define CALC_TYPE_LOAD 5 #define MAX_CALC_TYPES 6 -static char *calc_type_names[MAX_CALC_TYPES] = {"SUM(*)", "COUNT(*)", "MAX(*)", "MIN(*)", "AVG(*)", "LOAD(*)"}; +static const char *calc_type_names[MAX_CALC_TYPES] = {"SUM(*)", "COUNT(*)", "MAX(*)", "MIN(*)", "AVG(*)", "LOAD(*)"}; typedef struct _io_stat_calc_type_t { @@ -1443,7 +1443,7 @@ create_frames_or_bytes_menu_items(io_stat_t *io, GtkWidget *menu) } static void -create_ctrl_menu(io_stat_t *io, GtkWidget *box, char *name, void (*func)(io_stat_t *io, GtkWidget *menu)) +create_ctrl_menu(io_stat_t *io, GtkWidget *box, const char *name, void (*func)(io_stat_t *io, GtkWidget *menu)) { GtkWidget *hbox; GtkWidget *label; @@ -1678,7 +1678,7 @@ create_calc_types_menu_items(io_stat_graph_t *gio, GtkWidget *menu) static void -create_advanced_menu(io_stat_graph_t *gio, GtkWidget *box, char *name, void (*func)(io_stat_graph_t *io, GtkWidget *menu)) +create_advanced_menu(io_stat_graph_t *gio, GtkWidget *box, const char *name, void (*func)(io_stat_graph_t *io, GtkWidget *menu)) { GtkWidget *hbox; GtkWidget *label; diff --git a/gtk/mtp3_stat.c b/gtk/mtp3_stat.c index 68c768ba65..398578997e 100644 --- a/gtk/mtp3_stat.c +++ b/gtk/mtp3_stat.c @@ -65,7 +65,7 @@ typedef struct column_arrows { typedef struct _my_columns_t { guint32 value; - gchar *strptr; + const gchar *strptr; GtkJustification just; } my_columns_t; @@ -316,7 +316,7 @@ mtp3_stat_gtk_win_destroy_cb( static void mtp3_stat_gtk_win_create( mtp3_stat_dlg_t *dlg_p, - char *title) + const char *title) { int i; column_arrows *col_arrows; diff --git a/gtk/mtp3_summary.c b/gtk/mtp3_summary.c index 51d31e8dad..8fd2d629ba 100644 --- a/gtk/mtp3_summary.c +++ b/gtk/mtp3_summary.c @@ -65,7 +65,7 @@ typedef struct column_arrows { typedef struct _my_columns_t { guint32 value; - gchar *strptr; + const gchar *strptr; GtkJustification just; } my_columns_t; @@ -185,7 +185,7 @@ mtp3_sum_draw( int *tot_num_msus_p, double *tot_num_bytes_p) { - char *entries[MTP3_SUM_INIT_TABLE_NUM_COLUMNS]; + const char *entries[MTP3_SUM_INIT_TABLE_NUM_COLUMNS]; int i, j; int num_msus; double num_bytes; diff --git a/gtk/progress_dlg.c b/gtk/progress_dlg.c index 85231aed50..120763774f 100644 --- a/gtk/progress_dlg.c +++ b/gtk/progress_dlg.c @@ -326,7 +326,7 @@ stop_cb(GtkWidget *w _U_, gpointer data) * Update the progress information of the progress dialog box. */ void -update_progress_dlg(progdlg_t *dlg, gfloat percentage, gchar *status) +update_progress_dlg(progdlg_t *dlg, gfloat percentage, const gchar *status) { GtkWidget *dlg_w = dlg->dlg_w; GtkWidget *prog_bar; diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c index 17712eb061..cb724e0ed0 100644 --- a/gtk/rtp_analysis.c +++ b/gtk/rtp_analysis.c @@ -120,7 +120,7 @@ static guint32 yscale_max[MAX_YSCALE] = {AUTO_MAX_YSCALE, 1000, 2000, 5000, 1000 #define MAX_PIXELS_PER_TICK 4 #define DEFAULT_PIXELS_PER_TICK 1 static guint32 pixels_per_tick[MAX_PIXELS_PER_TICK] = {1, 2, 5, 10}; -static char *graph_descr[4] = {"Fwd Jitter", "Fwd Difference", "Rvr Jitter", "Rvr Difference"}; +static const char *graph_descr[4] = {"Fwd Jitter", "Fwd Difference", "Rvr Jitter", "Rvr Difference"}; /* unit is in ms */ #define MAX_TICK_VALUES 5 #define DEFAULT_TICK_VALUE 1 @@ -301,7 +301,7 @@ typedef struct _user_data_t { /* Column titles. */ -static gchar *titles[9] = { +static const gchar *titles[9] = { "Packet", "Sequence", "Delta (ms)", @@ -1998,7 +1998,7 @@ static void create_tick_interval_menu_items(user_data_t* user_data, GtkWidget *m } /****************************************************************************/ -static void create_ctrl_menu(user_data_t* user_data, GtkWidget *box, char *name, void (*func)(user_data_t* user_data, GtkWidget *menu)) +static void create_ctrl_menu(user_data_t* user_data, GtkWidget *box, const char *name, void (*func)(user_data_t* user_data, GtkWidget *menu)) { GtkWidget *hbox; GtkWidget *label; @@ -3113,11 +3113,11 @@ column_arrows* add_sort_by_column(GtkWidget* window, GtkWidget* clist, ascend_pm = gdk_pixmap_create_from_xpm_d(window->window, &ascend_bm, &win_style->bg[GTK_STATE_NORMAL], - (gchar **)clist_ascend_xpm); + (const gchar **)clist_ascend_xpm); descend_pm = gdk_pixmap_create_from_xpm_d(window->window, &descend_bm, &win_style->bg[GTK_STATE_NORMAL], - (gchar **)clist_descend_xpm); + (const gchar **)clist_descend_xpm); for (i=0; i<NUM_COLS; i++) { col_arrows[i].table = gtk_table_new(2, 2, FALSE); @@ -3342,7 +3342,7 @@ void create_rtp_dialog(user_data_t* user_data) /****************************************************************************/ static gboolean process_node(proto_node *ptree_node, header_field_info *hfinformation, - gchar* proto_field, guint32* p_result) + const gchar* proto_field, guint32* p_result) { field_info *finfo; proto_node *proto_sibling_node; @@ -3382,9 +3382,9 @@ static gboolean process_node(proto_node *ptree_node, header_field_info *hfinform /****************************************************************************/ static gboolean get_int_value_from_proto_tree(proto_tree *protocol_tree, - gchar* proto_name, - gchar* proto_field, - guint32* p_result) + const gchar* proto_name, + const gchar* proto_field, + guint32* p_result) { proto_node *ptree_node; header_field_info *hfinformation; diff --git a/gtk/sctp_chunk_stat_dlg.c b/gtk/sctp_chunk_stat_dlg.c index 8a74afe5a6..023960d7ee 100644 --- a/gtk/sctp_chunk_stat_dlg.c +++ b/gtk/sctp_chunk_stat_dlg.c @@ -68,10 +68,10 @@ enum chunk_types { COOKIE_ACK = 11 }; -char *chunk_name(int type) +const char *chunk_name(int type) { #define CASE(x) case x: s=#x; break - char *s = "unknown"; + const char *s = "unknown"; switch (type) { CASE(DATA); @@ -215,7 +215,7 @@ gtk_sctpstat_dlg(struct sctp_udata *u_data, unsigned int direction) GtkWidget *hbuttonbox2; GtkWidget *bt_close; - gchar *titles[NUM_COLS] = {"IP Address", "DATA", "INIT", "INIT_ACK", "SACK", "HEARTBEAT", "HEARTBEAT_ACK", "ABORT", "SHUTDOWN", "SHUTDOWN_ACK", "ERROR", "COOKIE_ECHO", "COOKIE_ACK", "Others"}; + const gchar *titles[NUM_COLS] = {"IP Address", "DATA", "INIT", "INIT_ACK", "SACK", "HEARTBEAT", "HEARTBEAT_ACK", "ABORT", "SHUTDOWN", "SHUTDOWN_ACK", "ERROR", "COOKIE_ECHO", "COOKIE_ACK", "Others"}; column_arrows *col_arrows; GdkBitmap *ascend_bm, *descend_bm; GdkPixmap *ascend_pm, *descend_pm; @@ -286,11 +286,11 @@ gtk_sctpstat_dlg(struct sctp_udata *u_data, unsigned int direction) ascend_pm = gdk_pixmap_create_from_xpm_d(scrolledwindow1->window, &ascend_bm, &win_style->bg[GTK_STATE_NORMAL], - (gchar **)clist_ascend_xpm); + (const gchar **)clist_ascend_xpm); descend_pm = gdk_pixmap_create_from_xpm_d(scrolledwindow1->window, &descend_bm, &win_style->bg[GTK_STATE_NORMAL], - (gchar **)clist_descend_xpm); + (const gchar **)clist_descend_xpm); for (i=0; i<NUM_COLS; i++) { col_arrows[i].table = gtk_table_new(2, 2, FALSE); diff --git a/gtk/sctp_stat_dlg.c b/gtk/sctp_stat_dlg.c index 9a91147c94..39455c7158 100644 --- a/gtk/sctp_stat_dlg.c +++ b/gtk/sctp_stat_dlg.c @@ -438,7 +438,7 @@ gtk_sctpstat_dlg(void) GtkWidget *hbuttonbox2; GtkWidget *bt_close; - gchar *titles[NUM_COLS] = {"Port 1","Port 2", "No of Packets", "Checksum", "No of Errors", "Data Chunks", "Data Bytes"}; + const gchar *titles[NUM_COLS] = {"Port 1","Port 2", "No of Packets", "Checksum", "No of Errors", "Data Chunks", "Data Bytes"}; column_arrows *col_arrows; GdkBitmap *ascend_bm, *descend_bm; GdkPixmap *ascend_pm, *descend_pm; @@ -495,11 +495,11 @@ gtk_sctpstat_dlg(void) ascend_pm = gdk_pixmap_create_from_xpm_d(scrolledwindow1->window, &ascend_bm, &win_style->bg[GTK_STATE_NORMAL], - (gchar **)clist_ascend_xpm); + (const gchar **)clist_ascend_xpm); descend_pm = gdk_pixmap_create_from_xpm_d(scrolledwindow1->window, &descend_bm, &win_style->bg[GTK_STATE_NORMAL], - (gchar **)clist_descend_xpm); + (const gchar **)clist_descend_xpm); for (i=0; i<NUM_COLS; i++) { col_arrows[i].table = gtk_table_new(2, 2, FALSE); diff --git a/gtk/tcp_graph.c b/gtk/tcp_graph.c index c79ca601b2..5cb0ac1e6a 100644 --- a/gtk/tcp_graph.c +++ b/gtk/tcp_graph.c @@ -159,7 +159,7 @@ struct axis { struct irect s; gdouble min, max; gdouble major, minor; /* major and minor ticks */ - char **label; + const char **label; }; #define HAXIS_INIT_HEIGHT 70 @@ -292,7 +292,7 @@ struct graph { /* this belongs to style structs of graph types that make use of it */ GtkToggleButton *time_orig_conn, *seq_orig_isn; } gui; - char **title; + const char **title; /* Next 4 attribs describe the graph in natural units, before any scaling. * For example, if we want to display graph of TCP conversation that * started 112.309845 s after beginning of the capture and ran until @@ -3297,14 +3297,14 @@ static void tseq_stevens_read_config (struct graph *g) g->s.tseq_stevens.seq_height = 4; g->s.tseq_stevens.flags = 0; - g->title = (char ** )g_malloc (2 * sizeof (char *)); + g->title = (const char ** )g_malloc (2 * sizeof (char *)); g->title[0] = "Time/Sequence Graph"; g->title[1] = NULL; - g->y_axis->label = (char ** )g_malloc (3 * sizeof (char * )); + g->y_axis->label = (const char ** )g_malloc (3 * sizeof (char * )); g->y_axis->label[0] = "number[B]"; g->y_axis->label[1] = "Sequence"; g->y_axis->label[2] = NULL; - g->x_axis->label = (char ** )g_malloc (2 * sizeof (char * )); + g->x_axis->label = (const char ** )g_malloc (2 * sizeof (char * )); g->x_axis->label[0] = "Time[s]"; g->x_axis->label[1] = NULL; } @@ -3512,18 +3512,18 @@ static void tseq_tcptrace_read_config (struct graph *g) gdk_gc_set_foreground (g->s.tseq_tcptrace.gc_ack[1], &color); g->elists->next = (struct element_list * ) - g_malloc (sizeof (struct element_list)); + g_malloc (sizeof (struct element_list)); g->elists->next->next = NULL; g->elists->next->elements = NULL; - g->title = (char ** )g_malloc (2 * sizeof (char *)); + g->title = (const char ** )g_malloc (2 * sizeof (char *)); g->title[0] = "Time/Sequence Graph"; g->title[1] = NULL; - g->y_axis->label = (char ** )g_malloc (3 * sizeof (char * )); + g->y_axis->label = (const char ** )g_malloc (3 * sizeof (char * )); g->y_axis->label[0] = "number[B]"; g->y_axis->label[1] = "Sequence"; g->y_axis->label[2] = NULL; - g->x_axis->label = (char ** )g_malloc (2 * sizeof (char * )); + g->x_axis->label = (const char ** )g_malloc (2 * sizeof (char * )); g->x_axis->label[0] = "Time[s]"; g->x_axis->label[1] = NULL; } @@ -3788,14 +3788,14 @@ static void tput_read_config (struct graph *g) g->s.tput.height = 4; g->s.tput.nsegs = 20; - g->title = (char ** )g_malloc (2 * sizeof (char *)); + g->title = (const char ** )g_malloc (2 * sizeof (char *)); g->title[0] = "Throughput Graph"; g->title[1] = NULL; - g->y_axis->label = (char ** )g_malloc (3 * sizeof (char * )); + g->y_axis->label = (const char ** )g_malloc (3 * sizeof (char * )); g->y_axis->label[0] = "[B/s]"; g->y_axis->label[1] = "Throughput"; g->y_axis->label[2] = NULL; - g->x_axis->label = (char ** )g_malloc (2 * sizeof (char * )); + g->x_axis->label = (const char ** )g_malloc (2 * sizeof (char * )); g->x_axis->label[0] = "Time[s]"; g->x_axis->label[1] = NULL; g->s.tput.flags = 0; @@ -3821,13 +3821,13 @@ static void rtt_read_config (struct graph *g) g->s.rtt.height = 4; g->s.rtt.flags = 0; - g->title = (char ** )g_malloc (2 * sizeof (char *)); + g->title = (const char ** )g_malloc (2 * sizeof (char *)); g->title[0] = "Round Trip Time Graph"; g->title[1] = NULL; - g->y_axis->label = (char ** )g_malloc (3 * sizeof (char * )); + g->y_axis->label = (const char ** )g_malloc (3 * sizeof (char * )); g->y_axis->label[0] = "RTT [s]"; g->y_axis->label[1] = NULL; - g->x_axis->label = (char ** )g_malloc (2 * sizeof (char * )); + g->x_axis->label = (const char ** )g_malloc (2 * sizeof (char * )); g->x_axis->label[0] = "Sequence Number[B]"; g->x_axis->label[1] = NULL; } diff --git a/gtk/voip_calls_dlg.c b/gtk/voip_calls_dlg.c index a24adef296..b77562ac06 100644 --- a/gtk/voip_calls_dlg.c +++ b/gtk/voip_calls_dlg.c @@ -239,7 +239,7 @@ voip_calls_on_filter (GtkButton *button _U_, const gchar *filter_string; gchar c; GString *filter_string_fwd; - gchar *filter_prepend; + const gchar *filter_prepend; gboolean isFirst = TRUE; GList* list; guint filter_length = 0; @@ -547,7 +547,7 @@ static void voip_calls_dlg_create (void) GtkWidget *bt_close; GtkTooltips *tooltips = gtk_tooltips_new(); - gchar *titles[NUM_COLS] = {"Start Time", "Stop Time", "Initial Speaker", "From", "To", "Protocol", "Packets", "State", "Comments"}; + const gchar *titles[NUM_COLS] = {"Start Time", "Stop Time", "Initial Speaker", "From", "To", "Protocol", "Packets", "State", "Comments"}; column_arrows *col_arrows; GtkWidget *column_lb; int i; diff --git a/progress_dlg.h b/progress_dlg.h index c50108b2b2..158b491356 100644 --- a/progress_dlg.h +++ b/progress_dlg.h @@ -75,7 +75,7 @@ delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title, * @param percentage the current percentage value (0..1) * @param status the new status string to show, e.g. "3000KB of 6000KB" */ -void update_progress_dlg(progdlg_t *dlg, gfloat percentage, gchar *status); +void update_progress_dlg(progdlg_t *dlg, gfloat percentage, const gchar *status); /** * Destroy the progress bar. diff --git a/tap-iostat.c b/tap-iostat.c index 4a261f90ad..c25f430108 100644 --- a/tap-iostat.c +++ b/tap-iostat.c @@ -43,7 +43,7 @@ typedef struct _io_stat_t { gint32 interval; /* unit is ms */ guint32 num_items; struct _io_stat_item_t *items; - char **filters; + const char **filters; } io_stat_t; #define CALC_TYPE_BYTES 0 @@ -429,7 +429,7 @@ iostat_draw(void *arg) static int -get_calc_field(char *filter, char **flt) +get_calc_field(const char *filter, const char **flt) { char field[256]; int i; @@ -461,10 +461,10 @@ get_calc_field(char *filter, char **flt) } static void -register_io_tap(io_stat_t *io, int i, char *filter) +register_io_tap(io_stat_t *io, int i, const char *filter) { GString *error_string; - char *flt; + const char *flt; io->items[i].prev=&io->items[i]; io->items[i].next=NULL; @@ -112,7 +112,7 @@ get_args_as_string(int argc, char **argv, int optind) } static char * -setup_tmpdir(char *dir) +setup_tmpdir(const char *dir) { int len = strlen(dir); char *newdir; @@ -266,7 +266,7 @@ compute_timestamp_diff(gint *diffsec, gint *diffusec, CLIENTNAME (terminal server): <remote name> */ -gchar *get_conn_cfilter(void) { +const gchar *get_conn_cfilter(void) { static GString *filter_str = NULL; gchar *env, **tokens; @@ -41,7 +41,7 @@ char *get_args_as_string(int, char **, int); void compute_timestamp_diff(gint *, gint *, guint32, guint32, guint32, guint32); /* Create a capture filter for the connection */ -char *get_conn_cfilter(void); +const char *get_conn_cfilter(void); #ifdef __cplusplus } |