X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Futil.c;h=f0875577fe07870d2972698310dc58070525c7b0;hb=28e9118f23dc1b501af6ee6c0b70d68a5df2d3f2;hp=547899fdc9d552f1f123b9ff5b4a202363278b29;hpb=17c3b45099488fbc22dc1d4e0e4600c17bc12645;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/util.c b/x2p/util.c index 547899f..f087557 100644 --- a/x2p/util.c +++ b/x2p/util.c @@ -1,6 +1,6 @@ /* $RCSfile: util.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:29 $ * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-2002, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -40,6 +40,7 @@ safemalloc(MEM_SIZE size) exit(1); } /*NOTREACHED*/ + return 0; } /* paranoid version of realloc */ @@ -64,6 +65,7 @@ saferealloc(Malloc_t where, MEM_SIZE size) exit(1); } /*NOTREACHED*/ + return 0; } /* safe version of free */ @@ -181,6 +183,7 @@ croak(char *pat,...) va_start(args, pat); vfprintf(stderr,pat,args); + va_end(args); #else fprintf(stderr,pat,a1,a2,a3,a4); #endif @@ -195,12 +198,16 @@ fatal(char *pat,...) va_start(args, pat); vfprintf(stderr,pat,args); + va_end(args); #else fprintf(stderr,pat,a1,a2,a3,a4); #endif exit(1); } +#if defined(__APPLE_CC__) +__private_extern__ /* warn() conflicts with libc */ +#endif void warn(char *pat,...) { @@ -209,6 +216,7 @@ warn(char *pat,...) va_start(args, pat); vfprintf(stderr,pat,args); + va_end(args); #else fprintf(stderr,pat,a1,a2,a3,a4); #endif