作図ソフト dia の改良版
Revision | 5cf30bff439606e6afbe890fa377d1a6edd75856 (tree) |
---|---|
Time | 2014-09-08 03:24:32 |
Author | Hans Breuer <hans@breu...> |
Commiter | Hans Breuer |
[scan-build] Value stored to 'alpha' is never read
diacolorselector.c:356:5: warning: Value stored to 'alpha' is never read
@@ -341,19 +341,17 @@ dia_color_selector_set_color (GtkWidget *widget, | ||
341 | 341 | const Color *color) |
342 | 342 | { |
343 | 343 | DiaColorSelector *cs = DIACOLORSELECTOR(widget); |
344 | - gint red, green, blue, alpha; | |
344 | + gint red, green, blue; | |
345 | 345 | gchar *entry; |
346 | 346 | red = color->red * 255; |
347 | 347 | green = color->green * 255; |
348 | 348 | blue = color->blue * 255; |
349 | - alpha = color->alpha * 255; | |
350 | 349 | if (color->red > 1.0 || color->green > 1.0 || color->blue > 1.0 || color->alpha > 1.0) { |
351 | 350 | printf("Color out of range: r %f, g %f, b %f, a %f\n", |
352 | 351 | color->red, color->green, color->blue, color->alpha); |
353 | 352 | red = MIN(red, 255); |
354 | 353 | green = MIN(green, 255); |
355 | 354 | blue = MIN(blue, 255); |
356 | - alpha = MIN(alpha, 255); | |
357 | 355 | } |
358 | 356 | entry = g_strdup_printf("#%02X%02X%02X", red, green, blue); |
359 | 357 | dia_dynamic_menu_select_entry(DIA_DYNAMIC_MENU(cs->ddm), entry); |
@@ -367,3 +365,4 @@ dia_color_selector_set_color (GtkWidget *widget, | ||
367 | 365 | gtk_color_button_set_alpha (cs->color_button, MIN(color->alpha * 65535, 65535)); |
368 | 366 | } |
369 | 367 | } |
368 | + |