summaryrefslogtreecommitdiff
path: root/shells/posh/patches/patch-aa
blob: 688c2659719d1470d3d301f7eda8f3b7e1736222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-aa,v 1.2 2013/06/11 22:21:38 mef Exp $

date: 2004-09-08 21:00:09 +0900;  author: jmmv;  state: Exp;
Fix build with gcc2.

--- src/builtins.c.orig	2004-09-08 13:54:59.000000000 +0200
+++ src/builtins.c
@@ -450,6 +450,8 @@ int posh_builtin_exitreturn(int argc, ch
 
 static void ers_walk(const void *nodep, const VISIT which, const int UNUSED(depth)) {
 	struct tbl *vp;
+	struct tbl *tvp;
+	int any_set = 0;
 
 	switch(which) {
 		case preorder:
@@ -460,8 +458,6 @@ static void ers_walk(const void *nodep, 
 		case postorder:
 		case leaf:
 			vp = *(struct tbl **)nodep;
-			struct tbl *tvp;
-			int any_set = 0;
 			/*
 			 * See if the parameter is set (for arrays, if any
 			 * element is set).