Move the savehandler assignment before setjmp() to avoid triggering
warnings about use before initialization with clang.
This commit is contained in:
parent
247e3a69b7
commit
90ca8ad494
|
@ -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 @@ NBCOMPATLIB= -L${COMPATOBJDIR} -lnbcompat
|
|||
SUBDIR+=USD.doc
|
||||
.endif
|
||||
|
||||
CWARNFLAGS.clang+= -Wno-uninitialized
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.subdir.mk>
|
||||
|
|
|
@ -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 @@ histcmd(int argc, char **argv)
|
|||
* Catch interrupts to reset active counter and
|
||||
* cleanup temp files.
|
||||
*/
|
||||
savehandler = handler;
|
||||
if (setjmp(jmploc.loc)) {
|
||||
active = 0;
|
||||
if (*editfile)
|
||||
|
@ -297,7 +298,6 @@ histcmd(int argc, char **argv)
|
|||
handler = savehandler;
|
||||
longjmp(handler->loc, 1);
|
||||
}
|
||||
savehandler = handler;
|
||||
handler = &jmploc;
|
||||
if (++active > MAXHISTLOOPS) {
|
||||
active = 0;
|
||||
|
|
Loading…
Reference in New Issue