[PR #1648] [MERGED] Fix compile-time issue involving implicit declaration of mapclut_paletee() #2356

Open
opened 2026-01-29 17:21:43 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1648
Author: @rhymeswithmogul
Created: 11/26/2024
Status: Merged
Merged: 11/27/2024
Merged by: @cfsmp3

Base: masterHead: fix-1646-missing-include


📝 Commits (2)

  • 6346446 Fix implicit declaration error on some systems.
  • c2973ab Update CHANGES.TXT.

📊 Changes

2 files changed (+2 additions, -0 deletions)

View changed files

📝 docs/CHANGES.TXT (+1 -0)
📝 src/lib_ccx/ocr.c (+1 -0)

📄 Description

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.

I was having the same issue, and making this change to that file allowed it to compile on my system (Ubuntu 24.10, GCC 14.2.0-4ubuntu2).

Fixes: #1646

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

{pull request content here}


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1648 **Author:** [@rhymeswithmogul](https://github.com/rhymeswithmogul) **Created:** 11/26/2024 **Status:** ✅ Merged **Merged:** 11/27/2024 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `fix-1646-missing-include` --- ### 📝 Commits (2) - [`6346446`](https://github.com/CCExtractor/ccextractor/commit/63464468951bb35f192d4761861bf2f29acf866c) Fix implicit declaration error on some systems. - [`c2973ab`](https://github.com/CCExtractor/ccextractor/commit/c2973abb9ea8cc7bbac1d0268b6c63493f320d7e) Update CHANGES.TXT. ### 📊 Changes **2 files changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/CHANGES.TXT` (+1 -0) 📝 `src/lib_ccx/ocr.c` (+1 -0) </details> ### 📄 Description 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. I was having the same issue, and making this change to that file allowed it to compile on my system (Ubuntu 24.10, GCC 14.2.0-4ubuntu2). Fixes: #1646 <!-- Please prefix your pull request with one of the following: **[FEATURE]** **[FIX]** **[IMPROVEMENT]**. --> **In raising this pull request, I confirm the following (please check boxes):** - [X] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [X] I have checked that another pull request for this purpose does not exist. - [X] I have considered, and confirmed that this submission will be valuable to others. - [X] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [X] I give this submission freely, and claim no ownership to its content. - [X] **I have mentioned this change in the [changelog](https://github.com/CCExtractor/ccextractor/blob/master/docs/CHANGES.TXT).** **My familiarity with the project is as follows (check one):** - [ ] I have never used CCExtractor. - [X] I have used CCExtractor just a couple of times. - [ ] I absolutely love CCExtractor, but have not contributed previously. - [ ] I am an active contributor to CCExtractor. --- {pull request content here} --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:21:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2356