From fa0ae17adbc8f73b707c33836d37841e81b9303a Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 5 Nov 2009 22:29:38 +0100 Subject: Make clang happier Add asserts to default: in switch statements Store pointed to variables locally so it knows they don't change Remove some dead assignments Mark ob_exit_with_error as noreturn Use "%s", msg instead of just msg to printf style functions Use the c_pfocus variable --- render/font.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'render') diff --git a/render/font.c b/render/font.c index 583c9f7d..cde0d030 100644 --- a/render/font.c +++ b/render/font.c @@ -217,7 +217,7 @@ static inline int font_calculate_baseline(RrFont *f, gint height) void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area) { - gint x,y,w,h; + gint x,y,w; XftColor c; gint mw; PangoRectangle rect; @@ -240,7 +240,7 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area) w = area->width; if (t->flow) w = MAX(w, t->maxwidth); w -= 4; - h = area->height; + /* h = area->height; */ if (t->flow) ell = PANGO_ELLIPSIZE_NONE; @@ -258,6 +258,8 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area) case RR_ELLIPSIZE_END: ell = PANGO_ELLIPSIZE_END; break; + default: + g_assert_not_reached(); } } -- cgit v1.2.3