diff options
author | Daniel Eklöf <daniel@ekloef.se> | 2024-06-12 20:18:30 +0200 |
---|---|---|
committer | Daniel Eklöf <daniel@ekloef.se> | 2024-06-12 20:18:30 +0200 |
commit | e8abb2a02fd5da0448097948ff88299b52bb7f50 (patch) | |
tree | fc18e30d49110ce7a115674ba69be60f903cced0 | |
parent | b0e0b8e3ab7b90986ca2c47a06015321b765f3e0 (diff) | |
download | wbg-e8abb2a02fd5da0448097948ff88299b52bb7f50.tar.gz |
jxl: initialize variables, to silence compiler warnings
-rw-r--r-- | jxl.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -21,8 +21,8 @@ jxl_load(FILE *fp, const char *path) bool ok = false; uint8_t *file_data = NULL; uint8_t *image = NULL; - size_t file_size, image_size; - int width, height, stride; + size_t file_size, image_size = 0; + int width = 0, height = 0, stride = 0; #if defined(WBG_HAVE_JXL_THREADS) JxlParallelRunner *runner = NULL; @@ -107,7 +107,7 @@ jxl_load(FILE *fp, const char *path) JxlResizableParallelRunnerSuggestThreads(width, height)); #endif } else if (status == JXL_DEC_NEED_IMAGE_OUT_BUFFER) { - size_t min_size; + size_t min_size = 0; if (JxlDecoderImageOutBufferSize(decoder, &jxl_format, &min_size) != JXL_DEC_SUCCESS) { LOG_ERR("%s: failed to get the minimum size of the output buffer", path); |