From owner-freebsd-bugs Sat Mar 15 15:20:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA15521 for bugs-outgoing; Sat, 15 Mar 1997 15:20:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id PAA15484; Sat, 15 Mar 1997 15:20:02 -0800 (PST) Resent-Date: Sat, 15 Mar 1997 15:20:02 -0800 (PST) Resent-Message-Id: <199703152320.PAA15484@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, charnier@xp11.frmug.org Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA14824 for ; Sat, 15 Mar 1997 15:09:54 -0800 (PST) Received: (from uucp@localhost) by frmug.org (8.8.5/8.8.5/frmug-2.0) with UUCP id AAA23605 for FreeBSD-gnats-submit@freebsd.org; Sun, 16 Mar 1997 00:09:26 +0100 (MET) Received: (from charnier@localhost) by xp11.frmug.org (8.8.5/8.8.5/xp11-uucp-1.1) id XAA05805; Sat, 15 Mar 1997 23:57:15 +0100 (CET) Message-Id: <199703152257.XAA05805@xp11.frmug.org> Date: Sat, 15 Mar 1997 23:57:15 +0100 (CET) From: Philippe Charnier Reply-To: charnier@xp11.frmug.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/2998: compilation warnings in patch Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 2998 >Category: bin >Synopsis: compilation warnings in patch >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 15 15:20:00 PST 1997 >Last-Modified: >Originator: Philippe Charnier >Organization: >Release: FreeBSD 3.0-CURRENT i386 >Environment: >Description: ===> gnu/usr.bin/patch /usr/src/gnu/usr.bin/patch/getopt.c: In function `_getopt_internal': /usr/src/gnu/usr.bin/patch/getopt.c:455: warning: implicit declaration of functi on `strncmp' /usr/src/gnu/usr.bin/patch/inp.c: In function `plan_a': /usr/src/gnu/usr.bin/patch/inp.c:145: warning: too many arguments for format /usr/src/gnu/usr.bin/patch/patch.c:433: warning: control reaches end of non-void function /usr/src/gnu/usr.bin/patch/util.c: In function `savestr': /usr/src/gnu/usr.bin/patch/util.c:172: warning: suggest parentheses around assig nment used as truth value /usr/src/gnu/usr.bin/patch/util.c: In function `fetchname': /usr/src/gnu/usr.bin/patch/util.c:420: warning: too many arguments for format >How-To-Repeat: >Fix: Index: gnu/usr.bin/patch/getopt.c =================================================================== RCS file: /home2h/FreeBSD.cvsroot/src/gnu/usr.bin/patch/getopt.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 getopt.c --- getopt.c 1993/06/19 14:21:51 1.1.1.1 +++ getopt.c 1997/03/15 11:38:18 @@ -75,6 +75,8 @@ #define __alloca alloca #endif /* GNU C library. */ +#include + /* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a long-named option. Because this is not POSIX.2 compliant, it is being phased out. */ Index: gnu/usr.bin/patch/inp.c =================================================================== RCS file: /home2h/FreeBSD.cvsroot/src/gnu/usr.bin/patch/inp.c,v retrieving revision 1.4 diff -u -r1.4 inp.c --- inp.c 1997/02/13 21:10:39 1.4 +++ inp.c 1997/03/15 11:30:21 @@ -142,7 +142,7 @@ #define try(f,a1,a2) (Sprintf(s + pathlen, f, a1, a2), stat(s, &cstat) == 0) if (( try("RCS/%s%s", filebase, RCSSUFFIX) - || try("RCS/%s" , filebase, 0) + || try("RCS/%s%s", filebase, "") || try( "%s%s", filebase, RCSSUFFIX)) && /* Check that RCS file is not working file. Index: gnu/usr.bin/patch/patch.c =================================================================== RCS file: /home2h/FreeBSD.cvsroot/src/gnu/usr.bin/patch/patch.c,v retrieving revision 1.7 diff -u -r1.7 patch.c --- patch.c 1997/02/13 21:10:41 1.7 +++ patch.c 1997/03/15 11:36:22 @@ -430,6 +430,7 @@ set_signals(1); } my_exit(failtotal); + return (0); /* not reached */ } /* Prepare to find the next patch to do in the patch file. */ Index: gnu/usr.bin/patch/util.c =================================================================== RCS file: /home2h/FreeBSD.cvsroot/src/gnu/usr.bin/patch/util.c,v retrieving revision 1.3 diff -u -r1.3 util.c --- util.c 1997/02/13 21:10:44 1.3 +++ util.c 1997/03/15 11:37:15 @@ -169,7 +169,7 @@ } else { t = rv; - while (*t++ = *s++); + while ((*t++ = *s++)); } return rv; } @@ -417,7 +417,7 @@ #define try(f, a1, a2) (Sprintf(tmpbuf + pathlen, f, a1, a2), stat(tmpbuf, &filestat) == 0) if ( try("RCS/%s%s", filebase, RCSSUFFIX) - || try("RCS/%s" , filebase, 0) + || try("RCS/%s%s", filebase, "") || try( "%s%s", filebase, RCSSUFFIX) || try("SCCS/%s%s", SCCSPREFIX, filebase) || try( "%s%s", SCCSPREFIX, filebase)) >Audit-Trail: >Unformatted: