Re: [PATCH] ls-files: use correct format string

2019-04-11 Thread Jeff King
On Thu, Apr 11, 2019 at 10:28:30PM +0100, Thomas Gummerer wrote: > > I didn't see any comment on this, but it seems like it must be obviously > > correct, since as you note we do define those fields as unsigned. I'm > > really surprised that -Wformat doesn't catch this, though. I wonder why. > >

Re: [PATCH] ls-files: use correct format string

2019-04-11 Thread Thomas Gummerer
On 04/11, Jeff King wrote: > On Sun, Apr 07, 2019 at 07:47:51PM +0100, Thomas Gummerer wrote: > > > struct stat_data and struct cache_time both use unsigned ints for all > > their members. However the format string for 'git ls-files --debug' > > currently uses %d for formatting these numbers. Th

Re: [PATCH] ls-files: use correct format string

2019-04-10 Thread Jeff King
On Sun, Apr 07, 2019 at 07:47:51PM +0100, Thomas Gummerer wrote: > struct stat_data and struct cache_time both use unsigned ints for all > their members. However the format string for 'git ls-files --debug' > currently uses %d for formatting these numbers. This means that we > potentially print

[PATCH] ls-files: use correct format string

2019-04-07 Thread Thomas Gummerer
struct stat_data and struct cache_time both use unsigned ints for all their members. However the format string for 'git ls-files --debug' currently uses %d for formatting these numbers. This means that we potentially print these values incorrectly if they are greater than INT_MAX. This has been