fix GCC 6.4 issues (finally a couple that aren't actual bugs,
but only weird code?): amd's amfs_program_exec() has a missing {} issue. flex's check_options() has odd inconsistent identation that trips the new ident checker. ntpd's oncore_check_leap_sec() and oncore_set_traim() have missing {} issues. sntp's optionLoadNested() an identation weirdness that trips the new ident checker. vi's cl_attr() has a wrong {} issue, and its vs_paint() has an identation weirdness that trips the new ident checker.
This commit is contained in:
parent
845c916a36
commit
b9c2640a34
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: amfs_program.c,v 1.1.1.3 2015/01/17 16:34:15 christos Exp $ */
|
||||
/* $NetBSD: amfs_program.c,v 1.2 2018/02/04 09:15:44 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2014 Erez Zadok
|
||||
@ -144,10 +144,11 @@ amfs_program_exec(char *info)
|
||||
* Put stdout to stderr
|
||||
*/
|
||||
(void) fclose(stdout);
|
||||
if (!logfp)
|
||||
if (!logfp) {
|
||||
logfp = stderr; /* initialize before possible first use */
|
||||
if (dup(fileno(logfp)) == -1)
|
||||
goto out;
|
||||
}
|
||||
if (fileno(logfp) != fileno(stderr)) {
|
||||
(void) fclose(stderr);
|
||||
if (dup(fileno(logfp)) == -1)
|
||||
|
18
external/bsd/flex/dist/src/main.c
vendored
18
external/bsd/flex/dist/src/main.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.6 2017/01/03 01:56:03 christos Exp $ */
|
||||
/* $NetBSD: main.c,v 1.7 2018/02/04 09:15:45 mrg Exp $ */
|
||||
|
||||
/* flex - tool to generate fast lexical analyzers */
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
|
||||
/* PURPOSE. */
|
||||
#include "flexdef.h"
|
||||
__RCSID("$NetBSD: main.c,v 1.6 2017/01/03 01:56:03 christos Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.7 2018/02/04 09:15:45 mrg Exp $");
|
||||
|
||||
|
||||
#include "version.h"
|
||||
@ -313,8 +313,8 @@ void check_options (void)
|
||||
}
|
||||
}
|
||||
|
||||
if (extra_type)
|
||||
buf_m4_define( &m4defs_buf, "M4_EXTRA_TYPE_DEFS", extra_type);
|
||||
if (extra_type)
|
||||
buf_m4_define( &m4defs_buf, "M4_EXTRA_TYPE_DEFS", extra_type);
|
||||
|
||||
if (!use_stdout) {
|
||||
FILE *prev_stdout;
|
||||
@ -497,12 +497,12 @@ void check_options (void)
|
||||
if (gen_line_dirs)
|
||||
outn("#line 0 \"M4_YY_OUTFILE_NAME\"\n");
|
||||
|
||||
/* Dump the user defined preproc directives. */
|
||||
if (userdef_buf.elts)
|
||||
outn ((char *) (userdef_buf.elts));
|
||||
/* Dump the user defined preproc directives. */
|
||||
if (userdef_buf.elts)
|
||||
outn ((char *) (userdef_buf.elts));
|
||||
|
||||
skelout ();
|
||||
/* %% [1.0] */
|
||||
skelout ();
|
||||
/* %% [1.0] */
|
||||
}
|
||||
|
||||
/* flexend - terminate flex
|
||||
|
8
external/bsd/ntp/dist/ntpd/refclock_oncore.c
vendored
8
external/bsd/ntp/dist/ntpd/refclock_oncore.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: refclock_oncore.c,v 1.14 2017/04/13 20:17:42 christos Exp $ */
|
||||
/* $NetBSD: refclock_oncore.c,v 1.15 2018/02/04 09:15:45 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
@ -3425,9 +3425,10 @@ oncore_check_leap_sec(
|
||||
instance->Bj_day = instance->BEHa[5];
|
||||
|
||||
if (instance->saw_Gj < 0) { /* -1 DONT have Gj use Bj */
|
||||
if ((instance->BEHa[4] == 6) || (instance->BEHa[4] == 12))
|
||||
if ((instance->BEHa[4] == 6) || (instance->BEHa[4] == 12)) {
|
||||
oncore_sendmsg(instance, oncore_cmd_Bj, sizeof(oncore_cmd_Bj));
|
||||
oncore_sendmsg(instance, oncore_cmd_Bl, sizeof(oncore_cmd_Bl));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3868,9 +3869,10 @@ oncore_set_traim(
|
||||
oncore_sendmsg(instance, oncore_cmd_Bnx, sizeof(oncore_cmd_Bnx));
|
||||
else if (instance->chan == 8)
|
||||
oncore_sendmsg(instance, oncore_cmd_Enx, sizeof(oncore_cmd_Enx));
|
||||
else /* chan == 12 */
|
||||
else { /* chan == 12 */
|
||||
oncore_sendmsg(instance, oncore_cmd_Ge0, sizeof(oncore_cmd_Ge0));
|
||||
oncore_sendmsg(instance, oncore_cmd_Hn0, sizeof(oncore_cmd_Hn0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
5
external/bsd/ntp/dist/sntp/libopts/nested.c
vendored
5
external/bsd/ntp/dist/sntp/libopts/nested.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nested.c,v 1.10 2016/05/01 23:32:01 christos Exp $ */
|
||||
/* $NetBSD: nested.c,v 1.11 2018/02/04 09:15:45 mrg Exp $ */
|
||||
|
||||
|
||||
/**
|
||||
@ -788,7 +788,8 @@ optionLoadNested(char const * text, char const * name, size_t nm_len)
|
||||
case NUL: goto scan_done;
|
||||
case '<': text = scan_xml(text, res_val);
|
||||
if (text == NULL) goto woops;
|
||||
if (*text == ',') text++; break;
|
||||
if (*text == ',') text++;
|
||||
break;
|
||||
case '#': text = strchr(text, NL); break;
|
||||
default: goto woops;
|
||||
}
|
||||
|
24
external/bsd/nvi/dist/cl/cl_funcs.c
vendored
24
external/bsd/nvi/dist/cl/cl_funcs.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cl_funcs.c,v 1.7 2017/11/13 01:51:47 rin Exp $ */
|
||||
/* $NetBSD: cl_funcs.c,v 1.8 2018/02/04 09:15:45 mrg Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -16,7 +16,7 @@
|
||||
static const char sccsid[] = "Id: cl_funcs.c,v 10.72 2002/03/02 23:18:33 skimo Exp (Berkeley) Date: 2002/03/02 23:18:33 ";
|
||||
#endif /* not lint */
|
||||
#else
|
||||
__RCSID("$NetBSD: cl_funcs.c,v 1.7 2017/11/13 01:51:47 rin Exp $");
|
||||
__RCSID("$NetBSD: cl_funcs.c,v 1.8 2018/02/04 09:15:45 mrg Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -144,22 +144,20 @@ cl_attr(SCR *sp, scr_attr_t attribute, int on)
|
||||
* do this automatically -- so, this attribute isn't as controlled by
|
||||
* the higher level screen as closely as one might like.
|
||||
*/
|
||||
if (on) {
|
||||
if (clp->ti_te != TI_SENT) {
|
||||
clp->ti_te = TI_SENT;
|
||||
if (clp->smcup == NULL)
|
||||
(void)cl_getcap(sp, "smcup", &clp->smcup);
|
||||
if (clp->smcup != NULL)
|
||||
(void)tputs(clp->smcup, 1, cl_putchar);
|
||||
}
|
||||
} else
|
||||
if (clp->ti_te != TE_SENT) {
|
||||
if (on) {
|
||||
if (clp->ti_te != TI_SENT) {
|
||||
clp->ti_te = TI_SENT;
|
||||
if (clp->smcup == NULL)
|
||||
(void)cl_getcap(sp, "smcup", &clp->smcup);
|
||||
if (clp->smcup != NULL)
|
||||
(void)tputs(clp->smcup, 1, cl_putchar);
|
||||
}
|
||||
} else if (clp->ti_te != TE_SENT) {
|
||||
clp->ti_te = TE_SENT;
|
||||
if (clp->rmcup == NULL)
|
||||
(void)cl_getcap(sp, "rmcup", &clp->rmcup);
|
||||
if (clp->rmcup != NULL)
|
||||
(void)tputs(clp->rmcup, 1, cl_putchar);
|
||||
(void)fflush(stdout);
|
||||
}
|
||||
(void)fflush(stdout);
|
||||
break;
|
||||
|
7
external/bsd/nvi/dist/vi/vs_refresh.c
vendored
7
external/bsd/nvi/dist/vi/vs_refresh.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vs_refresh.c,v 1.8 2017/11/14 12:20:55 rin Exp $ */
|
||||
/* $NetBSD: vs_refresh.c,v 1.9 2018/02/04 09:15:45 mrg Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1994
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -16,7 +16,7 @@
|
||||
static const char sccsid[] = "Id: vs_refresh.c,v 10.50 2001/06/25 15:19:37 skimo Exp (Berkeley) Date: 2001/06/25 15:19:37 ";
|
||||
#endif /* not lint */
|
||||
#else
|
||||
__RCSID("$NetBSD: vs_refresh.c,v 1.8 2017/11/14 12:20:55 rin Exp $");
|
||||
__RCSID("$NetBSD: vs_refresh.c,v 1.9 2018/02/04 09:15:45 mrg Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -603,7 +603,8 @@ fast: (void)gp->scr_cursor(sp, &y, ¬used);
|
||||
*
|
||||
* Walk through the map and find the current line.
|
||||
*/
|
||||
slow: for (smp = HMAP; smp->lno != LNO; ++smp);
|
||||
slow: for (smp = HMAP; smp->lno != LNO; ++smp)
|
||||
;
|
||||
|
||||
/*
|
||||
* 7e: Leftright scrolling adjustment.
|
||||
|
Loading…
Reference in New Issue
Block a user