[gtk+] css: Silence a clang warning



commit a14bb5578fa5de31c72c2ebc5fb1788890eb1648
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Mar 22 15:17:27 2015 -0400

    css: Silence a clang warning
    
    Clang complains that this check can never be true. Since this
    is a argument range check which we do to catch bad input,
    convince clang to not complain instead of taking it out.

 gtk/gtkcssenumvalue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssenumvalue.c b/gtk/gtkcssenumvalue.c
index 1e105f6..add4af3 100644
--- a/gtk/gtkcssenumvalue.c
+++ b/gtk/gtkcssenumvalue.c
@@ -333,7 +333,7 @@ static GtkCssValue font_variant_values[] = {
 GtkCssValue *
 _gtk_css_font_variant_value_new (PangoVariant font_variant)
 {
-  g_return_val_if_fail (font_variant < G_N_ELEMENTS (font_variant_values), NULL);
+  g_return_val_if_fail ((gint)font_variant < G_N_ELEMENTS (font_variant_values), NULL);
 
   return _gtk_css_value_ref (&font_variant_values[font_variant]);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]