From ehaupt@beaver.critical.ch  Wed Jun  8 19:58:45 2005
Return-Path: <ehaupt@beaver.critical.ch>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3CE5B16A41C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Jun 2005 19:58:45 +0000 (GMT)
	(envelope-from ehaupt@beaver.critical.ch)
Received: from beaver.critical.ch (217-162-251-247.dclient.hispeed.ch [217.162.251.247])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8A65643D49
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Jun 2005 19:58:44 +0000 (GMT)
	(envelope-from ehaupt@beaver.critical.ch)
Received: from beaver.critical.ch (localhost [127.0.0.1])
	by beaver.critical.ch (8.13.3/8.13.1) with ESMTP id j58Jwdwf008553
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 8 Jun 2005 21:58:39 +0200 (CEST)
	(envelope-from ehaupt@beaver.critical.ch)
Received: (from ehaupt@localhost)
	by beaver.critical.ch (8.13.3/8.13.1/Submit) id j58JwdCI008552;
	Wed, 8 Jun 2005 21:58:39 +0200 (CEST)
	(envelope-from ehaupt)
Message-Id: <200506081958.j58JwdCI008552@beaver.critical.ch>
Date: Wed, 8 Jun 2005 21:58:39 +0200 (CEST)
From: Emanuel Haupt <ehaupt@critical.ch>
Reply-To: Emanuel Haupt <ehaupt@critical.ch>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [maintainer-update] archivers/gzrecover 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         82050
>Category:       ports
>Synopsis:       [maintainer-update] archivers/gzrecover
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jylefort
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 08 20:00:32 GMT 2005
>Closed-Date:    Thu Jun 09 13:22:37 GMT 2005
>Last-Modified:  Thu Jun 09 13:22:37 GMT 2005
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->jylefort 
Responsible-Changed-By: jylefort 
Responsible-Changed-When: Wed Jun 8 23:00:27 GMT 2005 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=82050 
State-Changed-From-To: open->closed 
State-Changed-By: jylefort 
State-Changed-When: Thu Jun 9 13:22:32 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=82050 
>Unformatted:
