(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/color_edit_dlg.c) |
| |
| 529 | | | color_sel_ok_cb (GtkButton *button _U_, |
| 530 | | | gpointer user_data) |
| 531 | | | { |
| 532 | | | GdkColor new_color; |
| 533 | | | GtkWidget *color_dialog; |
| 534 | | | GtkWidget *parent; |
| 535 | | | GtkWidget *color_selection_fg, *color_selection_bg; |
| 536 | | | gboolean is_bg; |
| 537 | | | |
| 538 | | | color_dialog = (GtkWidget *)user_data; |
| 539 | | | |
| 540 | | | gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(
x /usr/include/gtk-2.0/gtk/gtkcolorsel.h |
| |
41 | #define GTK_COLOR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COLOR_SELECTION, GtkColorSelection)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
482 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
1678 | # define _G_TYPE_CIC(ip, gt, ct) \ |
1679 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) |
| |
x /usr/include/gtk-2.0/gtk/gtkcolorsel.h |
| |
40 | #define GTK_TYPE_COLOR_SELECTION (gtk_color_selection_get_type ()) |
| |
|
| 541 | | | GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel), &new_color);
x /usr/include/gtk-2.0/gtk/gtkcolorseldialog.h |
| |
41 | #define GTK_COLOR_SELECTION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COLOR_SELECTION_DIALOG, GtkColorSelectionDialog)) |
| |
|
| 542 | | | |
| 543 | | | if ( ! get_color(&new_color) ){ |
| 544 | | | simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, |
| 545 | | | "Could not allocate color. Try again."); |
| 546 | | | } else { |
| 547 | | | |
| 548 | | | |
| 549 | | | parent = (GtkWidget *)g_object_get_data(G_OBJECT(color_dialog), COLOR_SELECTION_PARENT);
x /usr/include/glib-2.0/gobject/gobject.h |
| |
52 | #define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
482 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
1678 | # define _G_TYPE_CIC(ip, gt, ct) \ |
1679 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
181 | #define G_TYPE_OBJECT G_TYPE_MAKE_FUNDAMENTAL (20) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
222 | #define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT)) |
| |
|
| 550 | | | |
| 551 | | | |
| 552 | | | |
| 553 | | | color_selection_fg = g_object_get_data(G_OBJECT(parent), COLOR_SELECTION_FG);
x /usr/include/glib-2.0/gobject/gobject.h |
| |
52 | #define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
482 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
1678 | # define _G_TYPE_CIC(ip, gt, ct) \ |
1679 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
181 | #define G_TYPE_OBJECT G_TYPE_MAKE_FUNDAMENTAL (20) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
222 | #define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT)) |
| |
|
Unused Value
The value assigned to color_selection_fg is never subsequently used on any execution path. |
|
| 554 | | | color_selection_bg = g_object_get_data(G_OBJECT(parent), COLOR_SELECTION_BG);
x /usr/include/glib-2.0/gobject/gobject.h |
| |
52 | #define G_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
482 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
1678 | # define _G_TYPE_CIC(ip, gt, ct) \ |
1679 | ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt)) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
181 | #define G_TYPE_OBJECT G_TYPE_MAKE_FUNDAMENTAL (20) |
| |
x /usr/include/glib-2.0/gobject/gtype.h |
| |
222 | #define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT)) |
| |
|
| 555 | | | is_bg = (color_dialog == color_selection_bg); |
| 556 | | | |
| 557 | | | color_sel_win_destroy(color_dialog); |
| 558 | | | |
| 559 | | | |
| 560 | | | if (is_bg) |
| 561 | | | gtk_widget_modify_base(filt_name_entry, GTK_STATE_NORMAL, &new_color); |
| 562 | | | else |
| 563 | | | gtk_widget_modify_text(filt_name_entry, GTK_STATE_NORMAL, &new_color); |
| 564 | | | } |
| 565 | | | } |
| |