Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2005 21:58:39 +0200 (CEST)
From:      Emanuel Haupt <ehaupt@critical.ch>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/82050: [maintainer-update] archivers/gzrecover 
Message-ID:  <200506081958.j58JwdCI008552@beaver.critical.ch>
Resent-Message-ID: <200506082000.j58K0WRg035714@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         82050
>Category:       ports
>Synopsis:       [maintainer-update] archivers/gzrecover
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 08 20:00:32 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Emanuel Haupt
>Release:        FreeBSD 5.4-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD beaver.critical.ch 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #1: Fri May 13 17:48:58 CEST 2005 root@beaver.critical.ch:/usr/obj/usr/src-release/src/sys/BEAVER i386


	
>Description:
[maintainer-update] archivers/gzrecover

the following patch makes all gcc warnings disappear. the patch has been
submitted back to the author.

>How-To-Repeat:
	
>Fix:

	



--- gzrecover.patch begins here ---
diff -uNr gzrecover.orig/files/patch-gzrecover.c gzrecover/files/patch-gzrecover.c
--- gzrecover.orig/files/patch-gzrecover.c	Thu Jan  1 01:00:00 1970
+++ gzrecover/files/patch-gzrecover.c	Wed Jun  8 21:54:03 2005
@@ -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 <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+@@ -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");
--- gzrecover.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506081958.j58JwdCI008552>