Re: [PATCH 1/8] mtd-utils: Fix printf format specifies with the wrong type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/29/20 8:36 AM, Alexander Dahl wrote:
> The correct length specifier for variables of type size_t would be 'z' so the 
> format specifier would be %zx or %zu. The 'l' for long might work on one 
> platform but lead to a warning on another. We face this regularly when 
> compiling the same source for 64 bit x86 and 32 bit arm.
> 
...
> Same with that ones.

Thanks! I tried to quickly check the actual types by doing a quick backwards
search but somehow must have missed that, probably relying to much on the
gcc & scan warnings agreeing with each other. Obviously the warning would
say "unsigned long" on x86_64 because it's typedef'd to that on x86_64. I'll
make sure to also double check again on a 32 bit VM.

Thanks,

David

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux