aboutsummaryrefslogtreecommitdiff
path: root/jxl.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-06-12 20:18:30 +0200
committerDaniel Eklöf <daniel@ekloef.se>2024-06-12 20:18:30 +0200
commite8abb2a02fd5da0448097948ff88299b52bb7f50 (patch)
treefc18e30d49110ce7a115674ba69be60f903cced0 /jxl.c
parentb0e0b8e3ab7b90986ca2c47a06015321b765f3e0 (diff)
downloadwbg-e8abb2a02fd5da0448097948ff88299b52bb7f50.tar.gz
jxl: initialize variables, to silence compiler warnings
Diffstat (limited to 'jxl.c')
-rw-r--r--jxl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/jxl.c b/jxl.c
index a06f299..6c1ac4d 100644
--- a/jxl.c
+++ b/jxl.c
@@ -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);