diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-11-22 18:49:22 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-11-22 18:49:22 +0000 |
commit | abff335348c4f3b1c694cf44bf089d2a437937b4 (patch) | |
tree | 04a1b878256345b35d56b783eccccf69b1a2f71c /src/cairo-pdf-operators.c | |
parent | 1effa1e8230e16c59ce5f42692095f7fb6622c99 (diff) | |
download | cairo-abff335348c4f3b1c694cf44bf089d2a437937b4.tar.gz |
pdf: Silence compiler for an impossible case
Make the default case be an assert to catch a silly programming error
and silence the compiler:
cairo-pdf-operators.c: In function ‘_word_wrap_stream_write’:
cairo-pdf-operators.c:300: warning: ‘count’ may be used uninitialized in
this function
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-pdf-operators.c')
-rw-r--r-- | src/cairo-pdf-operators.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c index bbaa3ebb2..54a30b29d 100644 --- a/src/cairo-pdf-operators.c +++ b/src/cairo-pdf-operators.c @@ -325,7 +325,11 @@ _word_wrap_stream_write (cairo_output_stream_t *base, } if (*data != '\n') _cairo_output_stream_write (stream->output, data, 1); + break; + default: + ASSERT_NOT_REACHED; + count = length; break; } data += count; |