Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tif_jxl: Add include for TIFF type and use TIFF_SIZE_FORMAT for error. #11624

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

schwehr
Copy link
Member

@schwehr schwehr commented Jan 9, 2025

Ran into errors on a custom Android build on Arm.

What does this PR do?

Fixes build errors on an obscure target config when copying these two files into a custom build of libtiff.

  1. The TIFF_SIZE_FORMAT use is generally good practice.
  2. The head include fix is for a when the header is used in other files where the TIFF type might not already be defined.
third_party/tiff/libtiff/tif_jxl.c:418:31: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
  416 |                               "JxlDecoderExtraChannelBufferSize returned %ld, "
      |                                                                          ~~~
      |                                                                          %zu
  417 |                               "expecting %u",
  418 |                               buffer_size, channel_size);
      |                               ^~~~~~~~~~~

What are related issues/pull requests?

None

Tasklist

  • Review
  • Adjust for comments
  • All CI builds and checks have passed

Environment

Provide environment details, if relevant:

  • Custom bazel build from debian-testing derivative
  • OS: Android on Arm inside libtiff at head ( 673347a742a87ceb9558cdd6960d20705ebee918 )
  • Compiler: clang near head

Ran into errors on a custom Android build on Arm.
@schwehr schwehr added the bug label Jan 9, 2025
@schwehr schwehr requested a review from rouault January 9, 2025 20:40
@rouault rouault merged commit 313e89c into OSGeo:master Jan 10, 2025
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants