Module Name: src Committed By: christos Date: Sun Aug 14 10:40:25 UTC 2011
Modified Files: src/bin/ksh: Makefile eval.c Log Message: kill gcc-4.5 hack. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/bin/ksh/Makefile cvs rdiff -u -r1.12 -r1.13 src/bin/ksh/eval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/ksh/Makefile diff -u src/bin/ksh/Makefile:1.28 src/bin/ksh/Makefile:1.29 --- src/bin/ksh/Makefile:1.28 Tue Jun 21 22:49:41 2011 +++ src/bin/ksh/Makefile Sun Aug 14 06:40:25 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2011/06/22 02:49:41 mrg Exp $ +# $NetBSD: Makefile,v 1.29 2011/08/14 10:40:25 christos Exp $ WARNS=3 @@ -50,8 +50,3 @@ CWARNFLAGS.clang+= -Wno-format-security .include <bsd.prog.mk> - -# XXX -.if ${HAVE_GCC} == 45 -COPTS.eval.c+= -Wno-error -.endif Index: src/bin/ksh/eval.c diff -u src/bin/ksh/eval.c:1.12 src/bin/ksh/eval.c:1.13 --- src/bin/ksh/eval.c:1.12 Tue Nov 24 11:00:42 2009 +++ src/bin/ksh/eval.c Sun Aug 14 06:40:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: eval.c,v 1.12 2009/11/24 16:00:42 seanb Exp $ */ +/* $NetBSD: eval.c,v 1.13 2011/08/14 10:40:25 christos Exp $ */ /* * Expansion - quoting, separation, substitution, globbing @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: eval.c,v 1.12 2009/11/24 16:00:42 seanb Exp $"); +__RCSID("$NetBSD: eval.c,v 1.13 2011/08/14 10:40:25 christos Exp $"); #endif @@ -185,6 +185,7 @@ x.split = 0; /* XXX gcc */ x.str = NULL; /* XXX gcc */ + x.u.strv = NULL;/* XXX gcc */ if (cp == NULL) internal_errorf(1, "expand(NULL)"); /* for alias, readonly, set, typeset commands */ @@ -714,7 +715,7 @@ if (sp[0] == '\0') /* Bad variable name */ return -1; - xp->var = (struct tbl *) 0; + xp->var = NULL; /* ${#var}, string length or array size */ if (sp[0] == '#' && (c = sp[1]) != '\0') { @@ -785,10 +786,12 @@ return -1; } if (e->loc->argc == 0) { + xp->u.strv = NULL; xp->str = null; state = c == '@' ? XNULLSUB : XSUB; } else { - xp->u.strv = (const char **) e->loc->argv + 1; + char **t = &e->loc->argv[1]; + xp->u.strv = (void *)(uintptr_t)t; xp->str = *xp->u.strv++; xp->split = c == '@'; /* $@ */ state = XARG;