From 63464468951bb35f192d4761861bf2f29acf866c Mon Sep 17 00:00:00 2001 From: Colin Cogle Date: Tue, 26 Nov 2024 08:46:51 -0500 Subject: [PATCH 1/2] Fix implicit declaration error on some systems. This commit fixes a compile-time error regarding an implicit declaration of mapclut_paletee() on some compilers and compiler versions. Notably, Arch Linux and Ubuntu 24.10 seem to be affected. The error resolved is: ``` ../src/lib_ccx/ocr.c: In function 'ocr_rect': ../src/lib_ccx/ocr.c:922:9: error: implicit declaration of function 'mapclut_paletee' [-Wimplicit-function-declaration] 922 | mapclut_paletee(palette, alpha, (uint32_t *)rect->data1, rect->nb_colors); | ^~~~~~~~~~~~~~~ ``` This was resolved by `#include`-ing "ccx_encoders_spupng.h" in the file src/lib_ccx/ocr.c. Thanks to GitHub user @steel-bucket for sharing the fix in this issue's comments. Fixes: #1646 --- src/lib_ccx/ocr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib_ccx/ocr.c b/src/lib_ccx/ocr.c index c43ca5589..350e1a19e 100644 --- a/src/lib_ccx/ocr.c +++ b/src/lib_ccx/ocr.c @@ -7,6 +7,7 @@ #include "ccx_common_constants.h" #include #include "ccx_encoders_helpers.h" +#include "ccx_encoders_spupng.h" #include "ocr.h" #undef OCR_DEBUG From c2973abb9ea8cc7bbac1d0268b6c63493f320d7e Mon Sep 17 00:00:00 2001 From: Colin Cogle Date: Tue, 26 Nov 2024 08:51:46 -0500 Subject: [PATCH 2/2] Update CHANGES.TXT. Mention the fix for #1646. Fixes: #1646 --- docs/CHANGES.TXT | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/CHANGES.TXT b/docs/CHANGES.TXT index 54301cd9c..f250da30a 100644 --- a/docs/CHANGES.TXT +++ b/docs/CHANGES.TXT @@ -36,6 +36,7 @@ - Improvement: Use Corrosion to build Rust code - Improvement: Ignore MXF Caption Essence Container version byte to enhance SRT subtitle extraction compatibility - New: Add tesseract page segmentation modes control with `--psm` flag +- Fix: Resolve compile-time error about implicit declarations (#1646) 0.94 (2021-12-14) -----------------