Skip to content

Conversation

botanegg
Copy link

@botanegg botanegg commented Aug 2, 2025

Changed %ld to %zu for PHP_VERSION_ID >= 70000, coz map_len is size_t now

Prevent next warings on 32bit systems
https://gitlab.alpinelinux.org/botanegg/aports/-/jobs/1958641#L325

/builds/botanegg/aports/community/php84-pecl-imagick/src/imagick-3.8.0/imagick_class.c:2428:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
 2428 |                                 "The map contains incorrect number of elements. Expected %ld, array has %u",
      |                                                                                          ~~^
      |                                                                                            |
      |                                                                                            long int
      |                                                                                          %d
......
 2432 |                                 (width * height) * map_len,
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~                                  
      |                                                  |
      |                                                  size_t {aka unsigned int}

Changed %ld to %zu for PHP_VERSION_ID >= 70000, coz map_len is size_t now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant