From d92c6988daf976e0f2ed05db4d17f6ef2b6ef9db Mon Sep 17 00:00:00 2001 From: Jean-Yves Lefort Date: Thu, 9 Jun 2005 13:22:26 +0000 Subject: [PATCH] Suppress compiler warnings. PR: ports/82050 Submitted by: maintainer --- archivers/gzrecover/files/patch-gzrecover.c | 49 +++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 archivers/gzrecover/files/patch-gzrecover.c diff --git a/archivers/gzrecover/files/patch-gzrecover.c b/archivers/gzrecover/files/patch-gzrecover.c new file mode 100644 index 000000000000..c379f404e5c6 --- /dev/null +++ b/archivers/gzrecover/files/patch-gzrecover.c @@ -0,0 +1,49 @@ +--- gzrecover.c.orig Sat Sep 4 19:55:08 2004 ++++ gzrecover.c Wed Jun 8 21:53:49 2005 +@@ -20,6 +20,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -85,10 +86,14 @@ + static int suffix = 1; + + /* Build the output file name */ +- if (outfile_specified) +- check_error(0, outfile = (char *)malloc(strlen(user_outname) + 9), "malloc"); +- else +- check_error(0, outfile = (char *)malloc(strlen(infile) + 25), "malloc"); ++ if (outfile_specified) { ++ outfile = (char *)malloc(strlen(user_outname) + 9); ++ check_error(0, (int)outfile, "malloc"); ++ } ++ else { ++ outfile = (char *)malloc(strlen(infile) + 25); ++ check_error(0, (int)outfile, "malloc"); ++ } + + if (!outfile_specified) /* Strip of .gz unless user specified name */ + { +@@ -223,7 +228,8 @@ + infile = argv[optind]; + + /* Open input file and memory map */ +- check_error(0, inbuf = (char *)malloc(inbuf_size), "malloc"); ++ inbuf = (char *)malloc(inbuf_size); ++ check_error(0, (int)inbuf, "malloc"); + check_error(-1, ifd = open(infile, O_RDONLY), "open"); + + if (verbose_mode) +@@ -231,7 +237,8 @@ + + /* Open output file & initialize output buffer */ + ofd = open_outfile(infile); +- check_error(0, outbuf = (char *)malloc(outbuf_size), "malloc"); ++ outbuf = (char *)malloc(outbuf_size); ++ check_error(0, (int)outbuf, "malloc"); + + /* Initialize zlib */ + check_error(-1, bytes_read = read_internal(ifd, inbuf, inbuf_size), "read");