Module Name: src
Committed By: joerg
Date: Tue Jul 12 16:40:41 UTC 2011
Modified Files:
src/bin/sh: Makefile histedit.c
Log Message:
Move the savehandler assignment before setjmp() to avoid triggering
warnings about use before initialization with clang.
To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/bin/sh/Makefile
cvs rdiff -u -r1.43 -r1.44 src/bin/sh/histedit.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/sh/Makefile
diff -u src/bin/sh/Makefile:1.95 src/bin/sh/Makefile:1.96
--- src/bin/sh/Makefile:1.95 Thu May 26 12:56:24 2011
+++ src/bin/sh/Makefile Tue Jul 12 16:40:41 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.95 2011/05/26 12:56:24 joerg Exp $
+# $NetBSD: Makefile,v 1.96 2011/07/12 16:40:41 joerg Exp $
# @(#)Makefile 8.4 (Berkeley) 5/5/95
.include <bsd.own.mk>
@@ -82,7 +82,5 @@
SUBDIR+=USD.doc
.endif
-CWARNFLAGS.clang+= -Wno-uninitialized
-
.include <bsd.prog.mk>
.include <bsd.subdir.mk>
Index: src/bin/sh/histedit.c
diff -u src/bin/sh/histedit.c:1.43 src/bin/sh/histedit.c:1.44
--- src/bin/sh/histedit.c:1.43 Sat Jun 18 21:18:46 2011
+++ src/bin/sh/histedit.c Tue Jul 12 16:40:41 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: histedit.c,v 1.43 2011/06/18 21:18:46 christos Exp $ */
+/* $NetBSD: histedit.c,v 1.44 2011/07/12 16:40:41 joerg Exp $ */
/*-
* Copyright (c) 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: histedit.c,v 1.43 2011/06/18 21:18:46 christos Exp $");
+__RCSID("$NetBSD: histedit.c,v 1.44 2011/07/12 16:40:41 joerg Exp $");
#endif
#endif /* not lint */
@@ -290,6 +290,7 @@
* Catch interrupts to reset active counter and
* cleanup temp files.
*/
+ savehandler = handler;
if (setjmp(jmploc.loc)) {
active = 0;
if (*editfile)
@@ -297,7 +298,6 @@
handler = savehandler;
longjmp(handler->loc, 1);
}
- savehandler = handler;
handler = &jmploc;
if (++active > MAXHISTLOOPS) {
active = 0;