diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2010-10-21 23:16:11 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2010-10-21 23:16:11 +0300 |
commit | 68b83f252df3d27480a9f6f03445d16f6506fef1 (patch) | |
tree | bad929e2c10b44006efb499637cabd2a1d7e8f0d /src | |
parent | liblzma: Update the comments in the API headers. (diff) | |
download | xz-68b83f252df3d27480a9f6f03445d16f6506fef1.tar.xz |
xz: Make sure that message_strm() can never return NULL.
Diffstat (limited to 'src')
-rw-r--r-- | src/xz/message.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/xz/message.c b/src/xz/message.c index c73099e6..38cce4a1 100644 --- a/src/xz/message.c +++ b/src/xz/message.c @@ -833,10 +833,13 @@ message_strm(lzma_ret code) case LZMA_STREAM_END: case LZMA_GET_CHECK: case LZMA_PROG_ERROR: - return _("Internal error (bug)"); + // Without "default", compiler will warn if new constants + // are added to lzma_ret, it is not too easy to forget to + // add the new constants to this function. + break; } - return NULL; + return _("Internal error (bug)"); } |