Module Name: src
Committed By: sjg
Date: Thu Mar 26 22:20:42 UTC 2015
Modified Files:
src/usr.bin/make: main.c
Log Message:
Move initialization of savederr to the block where it is used
to avoid spurious warning from gcc 5
To generate a diff of this commit:
cvs rdiff -u -r1.231 -r1.232 src/usr.bin/make/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.231 src/usr.bin/make/main.c:1.232
--- src/usr.bin/make/main.c:1.231 Tue Sep 9 06:18:17 2014
+++ src/usr.bin/make/main.c Thu Mar 26 22:20:42 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.231 2014/09/09 06:18:17 dholland Exp $ */
+/* $NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.231 2014/09/09 06:18:17 dholland Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.231 2014/09/09 06:18:17 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $");
#endif
#endif /* not lint */
#endif
@@ -1493,7 +1493,6 @@ Cmd_Exec(const char *cmd, const char **e
*errnum = NULL;
- savederr = 0;
if (!shellName)
Shell_Init();
@@ -1547,6 +1546,7 @@ Cmd_Exec(const char *cmd, const char **e
*/
(void)close(fds[1]);
+ savederr = 0;
Buf_Init(&buf, 0);
do {