wrap macro arguments in parentheses for robustness (#4681)

Co-authored-by: Bernd Petrovitsch <bernd@sysprog.at>
This commit is contained in:
Bernd Petrovitsch 2026-02-24 19:20:12 +01:00 committed by GitHub
parent 8d3f731763
commit 82553a7a5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -170,7 +170,7 @@ typedef enum {} fmt_signed_char;
# define fmt_format(buffer, size, fmt, ...) \
fmt_vformat( \
buffer, size, fmt, \
(buffer), (size), (fmt), \
(fmt_arg[]){{fmt_int}, FMT_MAP(FMT_MAKE_ARG, ##__VA_ARGS__)} + 1, \
FMT_NARG(__VA_ARGS__))