summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2009-11-05 22:29:38 +0100
committerDana Jansens <danakj@orodu.net>2009-11-07 17:07:05 -0500
commitfa0ae17adbc8f73b707c33836d37841e81b9303a (patch)
treedc6aaf1f7cd386f3d0c0862bd9985486c9b58aca /render
parenta170ad7c85b5f23fafe64d28a3f183a7ce42ce53 (diff)
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
Diffstat (limited to 'render')
-rw-r--r--render/font.c6
1 files changed, 4 insertions, 2 deletions
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();
}
}