Re: [PATCH v2 2/4] archive-tar: mark RECORDSIZE/BLOCKSIZE as unsigned
- From
René Scharfe <l.s.r@web.de>
- Date
- May 2, 2019, 20:30 UTC
- Message-ID
- <d960966d-a7d4-dc3e-ca0a-70e9e5d1abf3@web.de>
- In-Reply-To
- <ac2b2488a1b42b3caf8a84594c48eca796748e59.1556321244.git.gitgitgadget@gmail.com>
Am 27.04.19 um 01:27 schrieb Johannes Schindelin via GitGitGadget:
> From: Johannes Schindelin <johannes.schindelin@gmx.de> > > They really are unsigned, and we are using e.g. BLOCKSIZE as `size_t` > parameter to pass to `write_or_die()`.
True, but the compiler converts that value correctly to size_t without complaint already, doesn't it? What am I missing?
Show 20 quoted lines
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > --- > archive-tar.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/archive-tar.c b/archive-tar.c > index af9ea70733..be06c8b205 100644 > --- a/archive-tar.c > +++ b/archive-tar.c > @@ -9,7 +9,7 @@ > #include "streaming.h" > #include "run-command.h" > > -#define RECORDSIZE (512) > +#define RECORDSIZE (512u) > #define BLOCKSIZE (RECORDSIZE * 20) > > static char block[BLOCKSIZE]; >