Skip to content

ext/exif: Fix EXIF warning format specifiers for size_t values - #22750

Merged
LamentXU123 merged 3 commits into
php:masterfrom
LamentXU123:exif-
Jul 15, 2026
Merged

ext/exif: Fix EXIF warning format specifiers for size_t values#22750
LamentXU123 merged 3 commits into
php:masterfrom
LamentXU123:exif-

Conversation

@LamentXU123

@LamentXU123LamentXU123 commented Jul 15, 2026

Copy link
Copy Markdown
Member

They are all size_t, so should use %zu or %zX instead of %d or %X
for referrence

typedefstruct {
php_stream*infile;
char*FileName;
time_tFileDateTime;
size_tFileSize;
image_filetypeFileType;
intHeight, Width;
intIsColor;
floatApertureFNumber;
floatExposureTime;
doubleFocalplaneUnits;
floatCCDWidth;
floatFocalLength;
floatDistance;
char*UserComment;
intUserCommentLength;
char*UserCommentEncoding;
char*encode_unicode;
char*decode_unicode_be;
char*decode_unicode_le;
char*encode_jis;
char*decode_jis_be;
char*decode_jis_le;
char*Copyright;
char*CopyrightPhotographer;
char*CopyrightEditor;
xp_field_listxp_fields;
thumbnail_dataThumbnail;
intsections_found;
image_info_listinfo_list[SECTION_COUNT];
intread_thumbnail;
intread_all;
intifd_nesting_level;
intifd_count;
intnum_errors;
file_section_listfile;
} image_info_type;

so image_info_type->FileSize is size_t

@LamentXU123
LamentXU123 requested a review from GirgiasJuly 15, 2026 17:17
@LamentXU123
LamentXU123 merged commit 345b2a6 into php:masterJul 15, 2026
17 of 18 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@LamentXU123@Girgias