Module Name: src
Committed By: rillig
Date: Sun Jan 16 10:30:45 UTC 2022
Modified Files:
src/lib/libcurses: addbytes.c ins_wstr.c
Log Message:
libcurses: remove unreachable statements
Found by lint.
No binary change.
To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/lib/libcurses/addbytes.c
cvs rdiff -u -r1.20 -r1.21 src/lib/libcurses/ins_wstr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libcurses/addbytes.c
diff -u src/lib/libcurses/addbytes.c:1.59 src/lib/libcurses/addbytes.c:1.60
--- src/lib/libcurses/addbytes.c:1.59 Mon Sep 6 07:45:48 2021
+++ src/lib/libcurses/addbytes.c Sun Jan 16 10:30:45 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: addbytes.c,v 1.59 2021/09/06 07:45:48 rin Exp $ */
+/* $NetBSD: addbytes.c,v 1.60 2022/01/16 10:30:45 rillig Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: addbytes.c,v 1.59 2021/09/06 07:45:48 rin Exp $");
+__RCSID("$NetBSD: addbytes.c,v 1.60 2022/01/16 10:30:45 rillig Exp $");
#endif
#endif /* not lint */
@@ -398,7 +398,7 @@ _cursesi_addwchar(WINDOW *win, __LINE **
}
for (i = 0; i < wch->elements; i++) {
if (!(np = (nschar_t *) malloc(sizeof(nschar_t))))
- return ERR;;
+ return ERR;
np->ch = wch->vals[i];
np->next = lp->nsp;
lp->nsp = np;
@@ -523,7 +523,7 @@ _cursesi_addwchar(WINDOW *win, __LINE **
for (i = 1; i < wch->elements; i++) {
np = malloc(sizeof(nschar_t));
if (!np)
- return ERR;;
+ return ERR;
np->ch = wch->vals[i];
np->next = lp->nsp;
__CTRACE(__CTRACE_INPUT,
Index: src/lib/libcurses/ins_wstr.c
diff -u src/lib/libcurses/ins_wstr.c:1.20 src/lib/libcurses/ins_wstr.c:1.21
--- src/lib/libcurses/ins_wstr.c:1.20 Tue Nov 16 23:23:02 2021
+++ src/lib/libcurses/ins_wstr.c Sun Jan 16 10:30:45 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: ins_wstr.c,v 1.20 2021/11/16 23:23:02 kre Exp $ */
+/* $NetBSD: ins_wstr.c,v 1.21 2022/01/16 10:30:45 rillig Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ins_wstr.c,v 1.20 2021/11/16 23:23:02 kre Exp $");
+__RCSID("$NetBSD: ins_wstr.c,v 1.21 2022/01/16 10:30:45 rillig Exp $");
#endif /* not lint */
#include <string.h>
@@ -174,7 +174,7 @@ wins_nwstr(WINDOW *win, const wchar_t *w
cw = 1;
width -= cw;
scp++;
- continue;;
+ continue;
case L'\r':
width = 0;
@@ -242,7 +242,7 @@ wins_nwstr(WINDOW *win, const wchar_t *w
scp++;
if (lstr != slstr)
lstr--;
- continue;;
+ continue;
case L'\r':
width = 0;
@@ -254,7 +254,6 @@ wins_nwstr(WINDOW *win, const wchar_t *w
case L'\n':
goto loopdone;
- break;
case L'\t':
cw = wcwidth(ws[0]);