Skip to content

Commit b08c5fa

Browse files
Fix compile-time issue involving implicit declaration of mapclut_paletee() (#1648)
* 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 * Update CHANGES.TXT. Mention the fix for #1646. Fixes: #1646
1 parent cbd8e27 commit b08c5fa

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

docs/CHANGES.TXT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
- Improvement: Use Corrosion to build Rust code
3737
- Improvement: Ignore MXF Caption Essence Container version byte to enhance SRT subtitle extraction compatibility
3838
- New: Add tesseract page segmentation modes control with `--psm` flag
39+
- Fix: Resolve compile-time error about implicit declarations (#1646)
3940

4041
0.94 (2021-12-14)
4142
-----------------

src/lib_ccx/ocr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "ccx_common_constants.h"
88
#include <dirent.h>
99
#include "ccx_encoders_helpers.h"
10+
#include "ccx_encoders_spupng.h"
1011
#include "ocr.h"
1112
#undef OCR_DEBUG
1213

0 commit comments

Comments
 (0)