Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh Move the savehandler assignment before setjmp() to av...
details: https://anonhg.NetBSD.org/src/rev/358d32f09511
branches: trunk
changeset: 767232:358d32f09511
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Jul 12 16:40:41 2011 +0000
description:
Move the savehandler assignment before setjmp() to avoid triggering
warnings about use before initialization with clang.
diffstat:
bin/sh/Makefile | 4 +---
bin/sh/histedit.c | 6 +++---
2 files changed, 4 insertions(+), 6 deletions(-)
diffs (51 lines):
diff -r 0fe3220f4ca7 -r 358d32f09511 bin/sh/Makefile
--- a/bin/sh/Makefile Tue Jul 12 12:08:07 2011 +0000
+++ b/bin/sh/Makefile Tue Jul 12 16:40:41 2011 +0000
@@ -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>
diff -r 0fe3220f4ca7 -r 358d32f09511 bin/sh/histedit.c
--- a/bin/sh/histedit.c Tue Jul 12 12:08:07 2011 +0000
+++ b/bin/sh/histedit.c Tue Jul 12 16:40:41 2011 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index