aboutsummaryrefslogtreecommitdiff
path: root/src/xz/message.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2019-06-24 23:25:41 +0300
committerLasse Collin <lasse.collin@tukaani.org>2019-06-24 23:25:41 +0300
commit1b4675cebf7471f7cc9b7072c950e3de97147063 (patch)
treeb0cf7b11e0fd86051192427ac3390372fda8d318 /src/xz/message.c
parentxz: Silence a warning from clang -Wsign-conversion in main.c. (diff)
downloadxz-1b4675cebf7471f7cc9b7072c950e3de97147063.tar.xz
Add LZMA_RET_INTERNAL1..8 to lzma_ret and use one for LZMA_TIMED_OUT.
LZMA_TIMED_OUT is *internally* used as a value for lzma_ret enumeration. Previously it was #defined to 32 and cast to lzma_ret. That way it wasn't visible in the public API, but this was hackish. Now the public API has eight LZMA_RET_INTERNALx members and LZMA_TIMED_OUT is #defined to LZMA_RET_INTERNAL1. This way the code is cleaner overall although the public API has a few extra mysterious enum members.
Diffstat (limited to '')
-rw-r--r--src/xz/message.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xz/message.c b/src/xz/message.c
index c3b14c27..00eb65b6 100644
--- a/src/xz/message.c
+++ b/src/xz/message.c
@@ -833,6 +833,14 @@ message_strm(lzma_ret code)
case LZMA_GET_CHECK:
case LZMA_PROG_ERROR:
case LZMA_SEEK_NEEDED:
+ case LZMA_RET_INTERNAL1:
+ case LZMA_RET_INTERNAL2:
+ case LZMA_RET_INTERNAL3:
+ case LZMA_RET_INTERNAL4:
+ case LZMA_RET_INTERNAL5:
+ case LZMA_RET_INTERNAL6:
+ case LZMA_RET_INTERNAL7:
+ case LZMA_RET_INTERNAL8:
// 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.