From d43f1a32489e7d22c73f6d6e7a6df59436ad3e17 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Thu, 22 Nov 2012 17:47:49 +0100 Subject: Fix clang compiler warnings on FreeBSD in erts The following are deliberately left, as I have only a list of compiler warnings and no system to test on: hipe/hipe_x86_signal.c:264:5: warning: no previous prototype for function '_sigaction' [-Wmissing-prototypes] int __SIGACTION(int signum, const struct sigaction *act, struct sigaction *oldact) ^ hipe/hipe_x86_signal.c:222:21: note: expanded from macro '__SIGACTION' ^ 1 warning generated. sys/unix/sys_float.c:835:16: warning: declaration of 'struct exception' will not be visible outside of this function [-Wvisibility] matherr(struct exception *exc) ^ sys/unix/sys_float.c:835:1: warning: no previous prototype for function 'matherr' [-Wmissing-prototypes] matherr(struct exception *exc) ^ 2 warnings generated. drivers/unix/unix_efile.c:1504:11: warning: implicit declaration of function 'sendfile' [-Wimplicit-function-declaration] retval = sendfile(in_fd, out_fd, *offset, SENDFILE_CHUNK_SIZE, ^ 1 warning generated. --- erts/emulator/drivers/common/gzio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'erts/emulator/drivers/common') diff --git a/erts/emulator/drivers/common/gzio.c b/erts/emulator/drivers/common/gzio.c index ca6d25adb4..e085c262b0 100644 --- a/erts/emulator/drivers/common/gzio.c +++ b/erts/emulator/drivers/common/gzio.c @@ -13,6 +13,7 @@ # include "config.h" #endif #include +#include /* ssize_t on Mac OS X */ #include #ifdef HAVE_UNISTD_H #include @@ -314,7 +315,7 @@ local int get_byte(s) if (s->z_eof) return EOF; if (s->stream.avail_in == 0) { #ifdef UNIX - size_t res; + ssize_t res; errno = 0; res = ERTS_GZREAD(s->file, s->inbuf, Z_BUFSIZE); if (res == 0) { @@ -487,7 +488,7 @@ erts_gzread(gzFile file, voidp buf, unsigned len) } if (s->stream.avail_in == 0 && !s->z_eof) { #ifdef UNIX - size_t res; + ssize_t res; errno = 0; res = ERTS_GZREAD(s->file, s->inbuf, Z_BUFSIZE); if (res == 0) { -- cgit v1.2.3