[gtk+/gtk-3-16] css: Silence a clang warning
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] css: Silence a clang warning
- Date: Mon, 23 Mar 2015 03:15:37 +0000 (UTC)
commit 1768f3e5dd803562353f49db77dd8e06d8654924
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 e9ee788..107add4 100644
--- a/gtk/gtkcssenumvalue.c
+++ b/gtk/gtkcssenumvalue.c
@@ -337,7 +337,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]