removed tons of MSVC const related warnings.
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 10 Aug 2005 19:49:45 +0000 (19:49 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 10 Aug 2005 19:49:45 +0000 (19:49 +0000)
This might at some places interfere with the changes for gcc4, we might have to negotiate in that case :-)

Please note that a lot of these warnings were GTK1.x related only!

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

19 files changed:
gtk/capture_prefs.c
gtk/color_dlg.c
gtk/column_prefs.c
gtk/conversations_table.c
gtk/decode_as_dlg.c
gtk/dfilter_expr_dlg.c
gtk/gtk_stat_util.c
gtk/hostlist_table.c
gtk/main.c
gtk/mtp3_summary.c
gtk/packet_list.c
gtk/proto_dlg.c
gtk/proto_draw.c
gtk/proto_hier_stats_dlg.c
gtk/rtp_analysis.c
gtk/sctp_chunk_stat_dlg.c
gtk/sctp_stat_dlg.c
gtk/toolbar.c
gtk/ui_util.c

index bef43aa646de959c51218c08eff5f88166f4ab49..594d9d95276ded5d9a2befd6caf9711dc2037416 100644 (file)
@@ -288,7 +288,7 @@ ifopts_edit_cb(GtkWidget *w, gpointer data _U_)
        /*
         * Create current options CList.
         */
-       cur_clist = gtk_clist_new_with_titles(IFOPTS_CLIST_COLS, cur_titles);
+       cur_clist = gtk_clist_new_with_titles(IFOPTS_CLIST_COLS, (gchar **) cur_titles);
        gtk_clist_set_column_width(GTK_CLIST(cur_clist), 1, 230);
        gtk_clist_set_column_width(GTK_CLIST(cur_clist), 2, 260);
        gtk_clist_set_column_width(GTK_CLIST(cur_clist), 3, 40);
index cec6125f3f4a87f80610f85f16706aa52e9accd4..e35ed7c05f95981f8361b0e2f350156166dd6ac0 100644 (file)
@@ -317,7 +317,7 @@ colorize_dialog_new (char *filter)
   gtk_box_pack_start (GTK_BOX (list_vbox), scrolledwindow1, TRUE, TRUE, 0);
 
 #if GTK_MAJOR_VERSION < 2
-  color_filters = gtk_clist_new_with_titles(2, titles);
+  color_filters = gtk_clist_new_with_titles(2, (gchar **) titles);
 #else
   /* the list store contains : filter name, filter string, foreground
    * color, background color, pointer to color filter */
index b4d2f24d33af703e3104c34c893fd2548e8dcb5d..01f058e6d4ac91d2b80cc2355aa22412998f6fb5 100644 (file)
@@ -79,7 +79,7 @@ column_prefs_show() {
   gint               i;
   const gchar       *column_titles[] = {"Title", "Format"};
 #if GTK_MAJOR_VERSION < 2
-  gchar             *col_ent[2];
+  const gchar       *col_ent[2];
   gint               row;
 #else
   GtkListStore      *store;
@@ -154,7 +154,7 @@ column_prefs_show() {
   gtk_widget_show(list_sc);
 
 #if GTK_MAJOR_VERSION < 2
-  column_l = gtk_clist_new_with_titles(2, column_titles);
+  column_l = gtk_clist_new_with_titles(2, (gchar **) column_titles);
   /* XXX - make this match the packet list prefs? */
   gtk_clist_set_selection_mode(GTK_CLIST(column_l), GTK_SELECTION_SINGLE);
   gtk_clist_column_titles_passive(GTK_CLIST(column_l));
@@ -196,7 +196,7 @@ column_prefs_show() {
 #if GTK_MAJOR_VERSION < 2
     col_ent[0] = cfmt->title;
     col_ent[1] = col_format_desc(get_column_format_from_str(cfmt->fmt));
-    row = gtk_clist_append(GTK_CLIST(column_l), col_ent);
+    row = gtk_clist_append(GTK_CLIST(column_l), (gchar **) col_ent);
     gtk_clist_set_row_data(GTK_CLIST(column_l), row, clp);
 #else
     gtk_list_store_append(store, &iter);
@@ -425,7 +425,7 @@ column_list_new_cb(GtkWidget *w _U_, gpointer data _U_) {
     fmt_data     *cfmt;
     const gchar  *title = "New Column";
 #if GTK_MAJOR_VERSION < 2
-    gchar        *col_ent[2];
+    const gchar  *col_ent[2];
 #else
     GtkTreeModel *model;
     GtkTreeIter   iter;
@@ -442,7 +442,7 @@ column_list_new_cb(GtkWidget *w _U_, gpointer data _U_) {
 #if GTK_MAJOR_VERSION < 2
     col_ent[0] = title;
     col_ent[1] = col_format_desc(cur_fmt);
-    cur_row = gtk_clist_append(GTK_CLIST(column_l), col_ent);
+    cur_row = gtk_clist_append(GTK_CLIST(column_l), (gchar **) col_ent);
     gtk_clist_set_row_data(GTK_CLIST(column_l), cur_row,
                            g_list_last(prefs.col_list));
 
index 921c9f535f1d49b27d3dd0c245d5532b1e50615d..247271c5d4eee670bc203613764e95fdf426793b 100644 (file)
@@ -1616,7 +1616,7 @@ add_conversation_table_data(conversations_table *ct, const address *src, const a
 
     /* if this was a new conversation we have to create a clist row for it */
     if(new_conversation){
-        const char *entries[NUM_COLS];
+        char *entries[NUM_COLS];
         char frames[16],bytes[16],txframes[16],txbytes[16],rxframes[16],rxbytes[16];
 
         /* these values will be filled by call to draw_ct_table_addresses() below */
index 65da17479ddaa145f6630a49111885c91c98e1e0..54bea4cdb4dbc967d38703ce8c7f6f1128488be8 100644 (file)
@@ -285,7 +285,7 @@ const gchar *current_proto_name)
     text[E_LIST_D_INITIAL] = initial_proto_name;
     text[E_LIST_D_CURRENT] = current_proto_name;
 #if GTK_MAJOR_VERSION < 2
-    row = gtk_clist_prepend(clist, text);
+    row = gtk_clist_prepend(clist, (gchar **) text);
 #else
     gtk_list_store_append(store, &iter);
     gtk_list_store_set(store, &iter, E_LIST_D_TABLE, text[E_LIST_D_TABLE],
@@ -555,7 +555,7 @@ decode_show_cb (GtkWidget * w _U_, gpointer data _U_)
     {
        /* Initialize list */
 #if GTK_MAJOR_VERSION < 2
-       list = GTK_CLIST(gtk_clist_new_with_titles(E_LIST_D_COLUMNS, titles));
+       list = GTK_CLIST(gtk_clist_new_with_titles(E_LIST_D_COLUMNS, (gchar **) titles));
        gtk_clist_column_titles_passive(list);
        for (column = 0; column < E_LIST_D_COLUMNS; column++)
            gtk_clist_set_column_auto_resize(list, column, TRUE);
@@ -1266,7 +1266,7 @@ decode_add_to_list (const gchar *table_name, const gchar *proto_name, gpointer v
     text[E_LIST_S_PROTO_NAME] = proto_name;
     text[E_LIST_S_TABLE] = table_name;
 #if GTK_MAJOR_VERSION < 2
-    row = gtk_clist_prepend(list, text);
+    row = gtk_clist_prepend(list, (gchar **) text);
     gtk_clist_set_row_data(list, row, value);
 #else
     gtk_list_store_append(store, &iter);
@@ -1398,7 +1398,7 @@ decode_list_menu_finish(GtkWidget *list)
     text[E_LIST_S_PROTO_NAME] = "(default)";
     text[E_LIST_S_TABLE] = "(none)";
 #if GTK_MAJOR_VERSION < 2
-    row = gtk_clist_prepend(GTK_CLIST(list), text);
+    row = gtk_clist_prepend(GTK_CLIST(list), (gchar **) text);
     gtk_clist_set_row_data(GTK_CLIST(list), row, NULL);
 
     gtk_clist_select_row(GTK_CLIST(list), 0, -1);
@@ -1476,8 +1476,8 @@ decode_add_simple_page (const gchar *prompt, const gchar *title, const gchar *ta
 
     page = gtk_hbox_new(FALSE, 5);
     OBJECT_SET_DATA(page, E_PAGE_ACTION, decode_simple);
-    OBJECT_SET_DATA(page, E_PAGE_TABLE, table_name);
-    OBJECT_SET_DATA(page, E_PAGE_TITLE, title);
+    OBJECT_SET_DATA(page, E_PAGE_TABLE, (gchar *) table_name);
+    OBJECT_SET_DATA(page, E_PAGE_TITLE, (gchar *) title);
     OBJECT_SET_DATA(page, E_PAGE_VALUE, GUINT_TO_POINTER(value));
 
     /* Always enabled */
@@ -1526,7 +1526,7 @@ decode_add_tcpudp_page (const gchar *prompt, const gchar *table_name)
 
     page = gtk_hbox_new(FALSE, 5);
     OBJECT_SET_DATA(page, E_PAGE_ACTION, decode_transport);
-    OBJECT_SET_DATA(page, E_PAGE_TABLE, table_name);
+    OBJECT_SET_DATA(page, E_PAGE_TABLE, (gchar *) table_name);
     OBJECT_SET_DATA(page, E_PAGE_TITLE, "Transport");
 
     /* Always enabled */
@@ -1729,7 +1729,7 @@ decode_add_sctp_page (const gchar *prompt, const gchar *table_name)
 
     page = gtk_hbox_new(FALSE, 5);
     OBJECT_SET_DATA(page, E_PAGE_ACTION, decode_transport);
-    OBJECT_SET_DATA(page, E_PAGE_TABLE, table_name);
+    OBJECT_SET_DATA(page, E_PAGE_TABLE, (gchar *) table_name);
     OBJECT_SET_DATA(page, E_PAGE_TITLE, "Transport");
 
     vbox = gtk_vbox_new(FALSE, 5);
index 515fc7b2f8ab0e7f256c6a4f7c741cadc70eb152..71d84c2c917826f1acba628baa18fae86fffd7f1 100644 (file)
@@ -85,7 +85,7 @@ 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, const gchar *string,
-                                gpointer data);
+                                const gpointer data);
 static void display_value_fields(header_field_info *hfinfo,
                                  gboolean is_comparison, GtkWidget *value_label,
                                  GtkWidget *value_entry, 
@@ -431,7 +431,7 @@ build_boolean_values(GtkWidget *value_list_scrolled_win, GtkWidget *value_list,
      */
     if (values == NULL)
         values = &true_false;
-    add_value_list_item(value_list, values->true_string, values);
+    add_value_list_item(value_list, values->true_string, (const gpointer) values);
     add_value_list_item(value_list, values->false_string, NULL);
 
     /*
@@ -488,7 +488,7 @@ build_enum_values(GtkWidget *value_list_scrolled_win _U_, GtkWidget *value_list,
      */
     while (values->strptr != NULL) {
         add_value_list_item(value_list, values->strptr,
-                            values);
+                            (const gpointer) values);
         values++;
     }
 
@@ -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, const gchar *string, gpointer data)
+add_value_list_item(GtkWidget *value_list, const gchar *string, const gpointer data)
 {
 #if GTK_MAJOR_VERSION < 2
     GtkWidget *label, *item;
@@ -1078,7 +1078,7 @@ dfilter_expr_dlg_new(GtkWidget *filter_te)
 #if GTK_MAJOR_VERSION < 2
     int len;
     void *cookie;
-    gchar *name;
+    const gchar *name;
     GHashTable *proto_array;
     GtkCTreeNode *protocol_node, *item_node;
 #else
@@ -1326,7 +1326,7 @@ dfilter_expr_dlg_new(GtkWidget *filter_te)
         name = proto_get_protocol_short_name(protocol); /* name, short_name or filter name ? */
         protocol_node = gtk_ctree_insert_node(GTK_CTREE(field_tree),
                                               NULL, NULL,
-                                              &name, 5,
+                                              (gchar **) &name, 5,
                                               NULL, NULL, NULL, NULL,
                                               FALSE, FALSE);
         gtk_ctree_node_set_row_data(GTK_CTREE(field_tree), protocol_node,
index bc96023b697d3a57beaf43e7544b6ab1f564b605..97c2f970f28b067e5283a9068da2adb661716ba3 100644 (file)
@@ -107,7 +107,7 @@ create_stat_table(GtkWidget *scrolled_window, GtkWidget *vbox, int columns, cons
        int i;
 
        /* create table */
-       table = GTK_CLIST(gtk_clist_new_with_titles(columns, titles));
+       table = GTK_CLIST(gtk_clist_new_with_titles(columns, (gchar **) titles));
 
        gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0);
 
index 0785ef3812035a63e753d4cdaf8aa95126886e11..7ad13d8a0ab3bd611ad29c91be5d042b26fb8a20 100644 (file)
@@ -1041,7 +1041,7 @@ add_hostlist_table_data(hostlist_table *hl, const address *addr, guint32 port, g
 
     /* if this was a new talker we have to create a clist row for it */
     if(new_talker){
-        const char *entries[NUM_COLS];
+        char *entries[NUM_COLS];
         char frames[16],bytes[16],txframes[16],txbytes[16],rxframes[16],rxbytes[16];
 
         /* these values will be filled by call to draw_hostlist_table_addresses() below */
index 0759d62be0c2ef53f3b4b9ebedcddd1ae9837218..ec93f57d0f766fa6486c139e18a8dc0810007de8 100644 (file)
@@ -343,7 +343,7 @@ selected_ptree_info_cb(GtkWidget *widget _U_, gpointer data _U_)
                     "Hint 2: If you want to add a new protocol page, you should use the ProtocolTemplate,\n"
                     "which will save you a lot of editing and will give a consistent look over the pages.",
                     proto_abbrev, proto_abbrev);
-        simple_dialog_set_cb(dialog, selected_ptree_info_answered_cb, proto_abbrev);
+        simple_dialog_set_cb(dialog, selected_ptree_info_answered_cb, (gpointer) proto_abbrev);
     }
 }
 
index 8fd2d629ba676b0e5e06dfec7a2841fac549eebd..05b674c8268d3713d48d4b6b9b6fb139fefa359f 100644 (file)
@@ -222,7 +222,7 @@ mtp3_sum_draw(
 
        entries[5] = (seconds) ? g_strdup_printf("%.2f", num_bytes/seconds) : "N/A";
 
-       gtk_clist_insert(GTK_CLIST(table), i, entries);
+       gtk_clist_insert(GTK_CLIST(table), i, (gchar **) entries);
     }
 
     gtk_clist_sort(GTK_CLIST(table));
index 36345bc89d46fce1ca44a297627f677131b20fa8..5d2f414de99790a026c98039afbfcd624e2fd789 100644 (file)
@@ -558,10 +558,10 @@ packet_list_set_column_titles(void)
     win_style = gtk_widget_get_style(top_level);
     ascend_pm = gdk_pixmap_create_from_xpm_d(top_level->window, &ascend_bm,
                                              &win_style->bg[GTK_STATE_NORMAL],
-                                             clist_ascend_xpm);
+                                             (gchar **) clist_ascend_xpm);
     descend_pm = gdk_pixmap_create_from_xpm_d(top_level->window, &descend_bm,
                                               &win_style->bg[GTK_STATE_NORMAL],
-                                              clist_descend_xpm);
+                                              (gchar **) clist_descend_xpm);
 
     col_arrows = (column_arrows *) g_malloc(sizeof(column_arrows) *
                                             cfile.cinfo.num_cols);
@@ -702,7 +702,7 @@ packet_list_append(const gchar *text[], gpointer data)
 {
     gint row;
 
-    row = eth_clist_append(ETH_CLIST(packet_list), text);
+    row = eth_clist_append(ETH_CLIST(packet_list), (gchar **) text);
     eth_clist_set_row_data(ETH_CLIST(packet_list), row, data);
     return row;
 }
index f8f673bf0e66442fdca8b46999998dccf947a5cd..7b968c8b6ffbe657bb513c187297cb3467fe9f5b 100644 (file)
@@ -145,7 +145,7 @@ proto_cb(GtkWidget *w _U_, gpointer data _U_)
   gtk_widget_show(proto_sw);
 
 #if GTK_MAJOR_VERSION < 2
-  proto_list = gtk_clist_new_with_titles(3, titles);
+  proto_list = gtk_clist_new_with_titles(3, (gchar **) titles);
   gtk_container_add(GTK_CONTAINER(proto_sw), proto_list);
   gtk_clist_set_selection_mode(GTK_CLIST(proto_list), GTK_SELECTION_BROWSE);
   gtk_clist_column_titles_passive(GTK_CLIST(proto_list));
@@ -540,7 +540,7 @@ show_proto_selection(GtkListStore *proto_store)
   protocol_t *protocol;
   protocol_data_t *p;
 #if GTK_MAJOR_VERSION < 2
-  gchar *proto_text[3];
+  const gchar *proto_text[3];
 #endif
 
   /* Iterate over all the protocols */
@@ -572,7 +572,7 @@ show_proto_selection(GtkListStore *proto_store)
     proto_text[0] = STATUS_TXT (p->enabled);
     proto_text[1] = p->abbrev;
     proto_text[2] = p->name;
-    p->row = gtk_clist_append(proto_list, proto_text);
+    p->row = gtk_clist_append(proto_list, (gchar **) proto_text);
     gtk_clist_set_row_data(proto_list, p->row, p);
 #else
     gtk_list_store_append(proto_store, &p->iter);
index 4fb4c8b560aef36664c8ba074e1200688e4fc80e..59f8fe81944edd1a30229bb2b0a7fa43bd084ddf 100644 (file)
@@ -1378,7 +1378,7 @@ packet_hex_print_common(GtkTextView *bv, const guint8 *pd, int len, int bstart,
         convline = g_locale_to_utf8(line, cur, NULL, &newsize, NULL);
         gtk_text_buffer_insert_with_tags_by_name(buf, &iter, convline, newsize,
                                                  revstyle, NULL);
-        g_free(convline);
+        g_free( (gpointer) convline);
         cur = 0;
       }
       if (i < k) {
@@ -1392,7 +1392,7 @@ packet_hex_print_common(GtkTextView *bv, const guint8 *pd, int len, int bstart,
         convline = g_locale_to_utf8(line, cur, NULL, &newsize, NULL);
         gtk_text_buffer_insert_with_tags_by_name(buf, &iter, convline, newsize,
                                                  "plain", NULL);
-        g_free(convline);
+        g_free( (gpointer) convline);
         cur = 0;
       }
       reverse = newreverse;
@@ -1402,7 +1402,7 @@ packet_hex_print_common(GtkTextView *bv, const guint8 *pd, int len, int bstart,
     gtk_text_buffer_insert_with_tags_by_name(buf, &iter, convline, newsize,
                                              reverse ? revstyle : "plain",
                                              NULL);
-    g_free(convline);
+    g_free( (gpointer) convline);
     cur = 0;
     line[cur++] = '\n';
     gtk_text_buffer_insert_with_tags_by_name(buf, &iter, line, cur,
index bed0dc25703ec2e5401a231dc572d45790e7d968..d9e4b0cddef6ce841a6c66186e0d375000eb6d1c 100644 (file)
@@ -74,8 +74,8 @@ fill_in_tree_node(GNode *node, gpointer data)
     ph_stats_t      *ps = di->ps;
     gboolean        is_leaf;
     draw_info_t     child_di;
-    double         seconds;
-    const gchar     *text[NUM_STAT_COLUMNS];
+    double          seconds;
+    gchar           *text[NUM_STAT_COLUMNS];
 #if GTK_MAJOR_VERSION < 2
     GtkCTree        *tree = di->tree;
     GtkCTreeNode    *parent = di->parent;
@@ -96,7 +96,7 @@ fill_in_tree_node(GNode *node, gpointer data)
 
     seconds = ps->last_time - ps->first_time;
 
-    text[0] = stats->hfinfo->name;
+    text[0] = (gchar *) (stats->hfinfo->name);
     text[1] = g_strdup_printf("%6.2f%%",
                               PCT(stats->num_pkts_total, ps->tot_packets));
     text[2] = g_strdup_printf("%u", stats->num_pkts_total);
index cb724e0ed0de38451ebc46ca32045dfa5aa16171..34c43a18ea116fba5623eec775f42d43725c0455 100644 (file)
@@ -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],
-                       (const gchar **)clist_ascend_xpm);
+                       (gchar **)clist_ascend_xpm);
        descend_pm = gdk_pixmap_create_from_xpm_d(window->window,
                        &descend_bm,
                        &win_style->bg[GTK_STATE_NORMAL],
-                       (const gchar **)clist_descend_xpm);
+                       (gchar **)clist_descend_xpm);
 
        for (i=0; i<NUM_COLS; i++) {
                col_arrows[i].table = gtk_table_new(2, 2, FALSE);
index 023960d7ee851a3c307de8c2956c3335bd0613db..2a4185be458aa229d2295144510912af4ede6ed8 100644 (file)
@@ -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],
-                                                (const gchar **)clist_ascend_xpm);
+                                                (gchar **)clist_ascend_xpm);
        descend_pm = gdk_pixmap_create_from_xpm_d(scrolledwindow1->window,
                                                  &descend_bm,
                                                  &win_style->bg[GTK_STATE_NORMAL],
-                                                 (const gchar **)clist_descend_xpm);
+                                                 (gchar **)clist_descend_xpm);
        for (i=0; i<NUM_COLS; i++)
        {
                col_arrows[i].table = gtk_table_new(2, 2, FALSE);
index 39455c7158a481705d20ac2c743118c7ea81245a..fad456fef81cf3ecfd81b877397637a69a9d3f75 100644 (file)
@@ -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],
-                                                (const gchar **)clist_ascend_xpm);
+                                                (gchar **)clist_ascend_xpm);
        descend_pm = gdk_pixmap_create_from_xpm_d(scrolledwindow1->window,
                                                  &descend_bm,
                                                  &win_style->bg[GTK_STATE_NORMAL],
-                                                 (const gchar **)clist_descend_xpm);
+                                                 (gchar **)clist_descend_xpm);
        for (i=0; i<NUM_COLS; i++)
        {
                col_arrows[i].table = gtk_table_new(2, 2, FALSE);
index a24d0d44f18d9c9632dd6bd88be5b7610667cc2d..5b1fb2979e34c6ca51df49dd73ae840c281a5df9 100644 (file)
@@ -410,7 +410,7 @@ static void toolbar_append_separator(GtkWidget *toolbar) {
 
 #if GTK_MAJOR_VERSION < 2
 #define toolbar_item(new_item, window, toolbar, stock, tooltip, xpm, callback, user_data) { \
-    icon = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->white, xpm); \
+    icon = gdk_pixmap_create_from_xpm_d(window->window, &mask, &window->style->white, (gchar **) xpm); \
     iconw = gtk_pixmap_new(icon, mask); \
     new_item = gtk_toolbar_append_item(GTK_TOOLBAR (toolbar), \
         stock, tooltip, "Private", iconw, GTK_SIGNAL_FUNC(callback), user_data);\
index 6311c4ab61017b349e2040b275544846974347bd..0913567011f8b6c5c8d1b5c39a3637b59bf3dedc 100644 (file)
@@ -852,7 +852,7 @@ ctree_new_with_titles(gint columns, gint tree_column, const gchar *titles[])
 {
   GtkWidget *tree;
 
-  tree = gtk_ctree_new_with_titles(columns, tree_column, titles);
+  tree = gtk_ctree_new_with_titles(columns, tree_column, (gchar **) titles);
   setup_tree(tree);
   return tree;
 }
@@ -968,7 +968,7 @@ simple_list_new(gint cols, const gchar **titles) {
 
 
 #if GTK_MAJOR_VERSION < 2
-    plugins_list = gtk_clist_new_with_titles(cols, titles);
+    plugins_list = gtk_clist_new_with_titles(cols, (gchar **) titles);
     gtk_clist_set_selection_mode(GTK_CLIST(plugins_list), GTK_SELECTION_SINGLE);
     gtk_clist_column_titles_passive(GTK_CLIST(plugins_list));
     if(titles) {