Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libterminfo libterminfo: remove redundant lint annotations
details: https://anonhg.NetBSD.org/src/rev/90f661be7745
branches: trunk
changeset: 1023151:90f661be7745
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Aug 27 18:40:28 2021 +0000
description:
libterminfo: remove redundant lint annotations
Since 2021-02-28, lint does not warn about constant conditions if they
involve sizeof.
The fallthrough annotations have never been necessary for case labels
that directly follow each other.
diffstat:
lib/libterminfo/tparm.c | 52 ++++++++++++++++++++++++------------------------
1 files changed, 26 insertions(+), 26 deletions(-)
diffs (116 lines):
diff -r 13f80b80fe69 -r 90f661be7745 lib/libterminfo/tparm.c
--- a/lib/libterminfo/tparm.c Fri Aug 27 18:28:41 2021 +0000
+++ b/lib/libterminfo/tparm.c Fri Aug 27 18:40:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tparm.c,v 1.18 2020/03/27 15:11:57 christos Exp $ */
+/* $NetBSD: tparm.c,v 1.19 2021/08/27 18:40:28 rillig Exp $ */
/*
* Copyright (c) 2009, 2011, 2013 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: tparm.c,v 1.18 2020/03/27 15:11:57 christos Exp $");
+__RCSID("$NetBSD: tparm.c,v 1.19 2021/08/27 18:40:28 rillig Exp $");
#include <sys/param.h>
#include <assert.h>
@@ -42,7 +42,7 @@
#include <term.h>
#define LONG_STR_MAX ((CHAR_BIT * sizeof(long)) / 3)
-#define BUFINC 128 /* Size to increament the terminal buffer by */
+#define BUFINC 128 /* Size to increment the terminal buffer by */
#define VA_LONG_LONG 1
#define VA_CHAR_INT 2
@@ -157,7 +157,7 @@
continue;
c = *str++;
switch (c) {
- case 'l': /* FALLTHROUGH */
+ case 'l':
case 's':
if (lpop > 0) {
if (lpop <= piss_len)
@@ -235,7 +235,7 @@
if (va_type == VA_LONG_LONG) {
/* This only works if char * fits into a long
* on this platform. */
- if (sizeof(char *) <= sizeof(long)/*CONSTCOND*/)
+ if (sizeof(char *) <= sizeof(long))
params[l].string =
(char *)va_arg(parms, long);
else {
@@ -270,20 +270,20 @@
val = 0;
while (done == 0 && (size_t)(fp - fmt) < sizeof(fmt)) {
switch (c) {
- case 'c': /* FALLTHROUGH */
+ case 'c':
case 's':
*fp++ = c;
done = 1;
break;
- case 'd': /* FALLTHROUGH */
- case 'o': /* FALLTHROUGH */
- case 'x': /* FALLTHROUGH */
- case 'X': /* FALLTHROUGH */
+ case 'd':
+ case 'o':
+ case 'x':
+ case 'X':
*fp++ = 'l';
*fp++ = c;
done = 1;
break;
- case '#': /* FALLTHROUGH */
+ case '#':
case ' ':
*fp++ = c;
break;
@@ -368,9 +368,9 @@
push((long)l, NULL, &stack);
#endif
break;
- case 'd': /* FALLTHROUGH */
- case 'o': /* FALLTHROUGH */
- case 'x': /* FALLTHROUGH */
+ case 'd':
+ case 'o':
+ case 'x':
case 'X':
pop(&val, NULL, &stack);
if (onum(term, fmt, (int)val, olen) == 0)
@@ -425,18 +425,18 @@
if (*str == '}')
str++;
break;
- case '+': /* FALLTHROUGH */
- case '-': /* FALLTHROUGH */
- case '*': /* FALLTHROUGH */
- case '/': /* FALLTHROUGH */
- case 'm': /* FALLTHROUGH */
- case 'A': /* FALLTHROUGH */
- case 'O': /* FALLTHROUGH */
- case '&': /* FALLTHROUGH */
- case '|': /* FALLTHROUGH */
- case '^': /* FALLTHROUGH */
- case '=': /* FALLTHROUGH */
- case '<': /* FALLTHROUGH */
+ case '+':
+ case '-':
+ case '*':
+ case '/':
+ case 'm':
+ case 'A':
+ case 'O':
+ case '&':
+ case '|':
+ case '^':
+ case '=':
+ case '<':
case '>':
pop(&val, NULL, &stack);
pop(&val2, NULL, &stack);
Home |
Main Index |
Thread Index |
Old Index