]> wimlib.net Git - wimlib/commitdiff
Fix wimlib_lzx_compress()
authorEric Biggers <ebiggers3@gmail.com>
Mon, 18 Nov 2013 01:48:39 +0000 (19:48 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 18 Nov 2013 01:55:51 +0000 (19:55 -0600)
include/wimlib.h
src/lzx-compress.c

index 7e89f4a7676076027da8c4a87fdba6f54bd3fff3..ca16d9404a60a5b23268612f435643fa0adb9437 100644 (file)
@@ -2710,7 +2710,8 @@ wimlib_join(const wimlib_tchar * const *swms,
  * format and therefore requires (@p chunk_size <= 32768).
  */
 extern unsigned
-wimlib_lzx_compress(const void *chunk, unsigned chunk_size, void *out);
+wimlib_lzx_compress(const void *chunk, unsigned chunk_size, void *out)
+                       _wimlib_deprecated;
 
 /**
  * @ingroup G_compression
index ea55fca42f9ab24ae3c87373328ac2b750344af6..a6883ac077a68d36fe91c5c62fc0388c95910114 100644 (file)
@@ -2653,7 +2653,7 @@ wimlib_lzx_alloc_context(const struct wimlib_lzx_params *params,
 
        if (params == NULL) {
                LZX_DEBUG("Using default algorithm and parameters.");
-               params = &slow_default;
+               params = &fast_default;
        }
 
        if (params->algorithm != WIMLIB_LZX_ALGORITHM_SLOW &&
@@ -2838,7 +2838,7 @@ wimlib_lzx_compress(const void * const restrict uncompressed_data,
                    void       * const restrict compressed_data)
 {
        int ret;
-       struct wimlib_lzx_context *ctx;
+       struct wimlib_lzx_context *ctx = NULL;
        unsigned compressed_len;
 
        ret = wimlib_lzx_alloc_context(NULL, &ctx);