Re: [PATCH 4/5] Make 'diff_populate_filespec()' use the new 'strbuf_readlink()'
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Dec 18, 2008, 17:49 UTC
- Message-ID
- <alpine.LFD.2.00.0812180945330.14014@localhost.localdomain>
- In-Reply-To
- <494A8B57.6070106@lsrfire.ath.cx>
On Thu, 18 Dec 2008, René Scharfe wrote:
Show 8 quoted lines
> > Yes, but now I get two new warnings: > > diff.c: In function `diff_populate_filespec': > diff.c:1809: warning: passing arg 2 of `sha1_object_info' from > incompatible pointer type > diff.c:1811: warning: passing arg 3 of `read_sha1_file' from > incompatible pointer type
Yeah, yeah, we should probably fix it all, but you're right, your patch avoids the pain.
The good news is that "size_t" and "unsigned long" really are the same size on all sane platforms. You'll see differences just in the odd 16-bit world ("small" memory model with 16-bit size_t and possibly 32-bit "long")
Although I guess some really odd more modern case might have a 32-bit pointer (and size_t) and 64-bit long. If it's possible to screw the type system up, history shows that somebody (usually Windows) will do it.
Linus