From: Zbigniew Jędrzejewski-Szmek Date: Wed, 14 May 2025 20:03:29 +0000 (+0200) Subject: src/boot: assume that intmax_t is the biggest integer X-Git-Tag: v258-rc1~579^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ecd641ac8453f79b5095c4246b83e979cad7e78;p=thirdparty%2Fsystemd.git src/boot: assume that intmax_t is the biggest integer Same as in 81d7934882ae13c64d9b08d365a0baa011cb2fbb, intmax_t by definition is the widest int. Strictly speaking, the check whether sizeof(intmax_t) == sizeof(long long) in the code below is redundant, but I think it's nicer to keep it for symmetry with the other cases. Requested in https://github.com/systemd/systemd/pull/37442#pullrequestreview-2840906908. --- diff --git a/src/boot/efi-string.c b/src/boot/efi-string.c index 4b9c3181c08..59cb0fa9f54 100644 --- a/src/boot/efi-string.c +++ b/src/boot/efi-string.c @@ -755,7 +755,7 @@ static bool handle_format_specifier(FormatContext *ctx, SpecifierContext *sp) { * otherwise warn about fetching smaller types. */ assert_cc(sizeof(int) == 4); assert_cc(sizeof(wchar_t) <= sizeof(int)); - assert_cc(sizeof(intmax_t) <= sizeof(long long)); + assert_cc(sizeof(long long) == sizeof(intmax_t)); assert(ctx); assert(sp);