From: Steffen Prohaska <prohaska@zib.de> From: Steffen Prohaska <prohaska@zib.de> read_in_full() is used in compat/pread.c. read_in_full() is declared in cache.h. But we can't include cache.h because too many macros are defined there. Using read_in_full() without including cache.h is dangerous because we wouldn't recognize if its prototyp changed. gcc issues a warning about that. This commit adds a forward decl to git-compat-util.h. git-compat-util.h is included by compat/pread.c _and_ cache.h. Hence, changes in cache.h would be detected. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> --- git-compat-util.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index 5ecdd40..4a8df8e 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -168,6 +168,10 @@ extern int git_munmap(void *start, size_t length); #define pread git_pread extern ssize_t git_pread(int fd, void *buf, size_t count, off_t offset); #endif +/* Forward decl that will remind us if its twin in cache.h changes. + This function in used in compat/pread.c. But we can't include + cache.h there. */ +extern int read_in_full(int fd, void *buf, size_t count); #ifdef NO_SETENV #define setenv gitsetenv -- 1.5.4.1.126.ge5a7d - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Rene Herman | [PATCH] x86: provide a DMI based port 0x80 I/O delay override |
| Greg KH | [02/50] DVB: get_dvb_firmware: update script for new location of sp8870 firmware |
| Linus Torvalds | Linux 2.6.26-rc4 |
| Daniel Walker | Re: [PATCH 3/3] net: wireless: bcm43xx: big_buffer_sem semaphore to mutex |
git: | |
| Junio C Hamano | Re: [RFC] Cache negative delta pairs |
| Stefan Richter | Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins |
| Martin Langhoff | Handling large files with GIT |
| David Symonds | Re: git and binary files |
| Rémi Denis-Courmont | [PATCH 09/14] Phonet: allocate and initialize new sockets |
| David Miller | [GIT]: Networking |
| David Miller | Re: sockets affected by IPsec always block (2.6.23) |
| Stephen Hemminger | Re: [PATCH 1/2] IPV4: remove addresses and routes when carrier is lost |
| Richard Stallman | Real men don't attack straw men |
| Leon Dippenaar | New tcp stack attack |
| Chris Tankersley | Dell PERC 3/Di - No Disks Found |
| Anselm R. Garbe | OpenBSD 4.0 / Xorg -> vesa 1920x1200 widescreen resolution |
