[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tweaks: make three conversion specifications more compliant
From: |
Benno Schulenberg |
Subject: |
Re: [PATCH] tweaks: make three conversion specifications more compliant |
Date: |
Sun, 9 May 2021 11:02:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Op 09-05-2021 om 00:34 schreef Hussam al-Homsi:
> https://man7.org/linux/man-pages/man7/system_data_types.7.html, which for
> off_t says:
>
> "Used for file sizes. According to POSIX, this shall be a signed
> integer
> type."
>
> So the cast to intmax_t is fine as it matches the signedness, and then "%jd"
> matches the type.
The cast to intmax_t may be fine, but why cast at all?
> "Specifies that a following d, i, o, u, x, or X conversion specifier
> applies to a signed char or unsigned char argument"
And how is that going to change anything? A signed or unsigned char will be
in the range 0x00 to 0xFF, that will fit perfectly fine in a %X.
Please send patches that actually fix things, where some compiler complains
about something, not for things that work perfectly fine as they are.
I humored you on the previous patch, but things were fine as they were --
in my opinion better even: having no space between #include and <filename>
is ugly, and no sensible header file will have a space or quote in its name,
so in my opinion it was good that nano refused to color those.
Benno
signature.asc
Description: OpenPGP digital signature