• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Revisão5cf30bff439606e6afbe890fa377d1a6edd75856 (tree)
Hora2014-09-08 03:24:32
AutorHans Breuer <hans@breu...>
CommiterHans Breuer

Mensagem de Log

[scan-build] Value stored to 'alpha' is never read

diacolorselector.c:356:5: warning: Value stored to 'alpha' is never read

alpha = MIN(alpha, 255);
~

Mudança Sumário

Diff

--- a/lib/diacolorselector.c
+++ b/lib/diacolorselector.c
@@ -341,19 +341,17 @@ dia_color_selector_set_color (GtkWidget *widget,
341341 const Color *color)
342342 {
343343 DiaColorSelector *cs = DIACOLORSELECTOR(widget);
344- gint red, green, blue, alpha;
344+ gint red, green, blue;
345345 gchar *entry;
346346 red = color->red * 255;
347347 green = color->green * 255;
348348 blue = color->blue * 255;
349- alpha = color->alpha * 255;
350349 if (color->red > 1.0 || color->green > 1.0 || color->blue > 1.0 || color->alpha > 1.0) {
351350 printf("Color out of range: r %f, g %f, b %f, a %f\n",
352351 color->red, color->green, color->blue, color->alpha);
353352 red = MIN(red, 255);
354353 green = MIN(green, 255);
355354 blue = MIN(blue, 255);
356- alpha = MIN(alpha, 255);
357355 }
358356 entry = g_strdup_printf("#%02X%02X%02X", red, green, blue);
359357 dia_dynamic_menu_select_entry(DIA_DYNAMIC_MENU(cs->ddm), entry);
@@ -367,3 +365,4 @@ dia_color_selector_set_color (GtkWidget *widget,
367365 gtk_color_button_set_alpha (cs->color_button, MIN(color->alpha * 65535, 65535));
368366 }
369367 }
368+