Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 lint: clean up mix of 'case' and 'if'



details:   https://anonhg.NetBSD.org/src/rev/cae917cc4a05
branches:  trunk
changeset: 1022403:cae917cc4a05
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Jul 15 22:47:17 2021 +0000

description:
lint: clean up mix of 'case' and 'if'

No functional change.

diffstat:

 usr.bin/xlint/lint1/decl.c |  19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diffs (41 lines):

diff -r f80997139db0 -r cae917cc4a05 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Thu Jul 15 22:42:46 2021 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Thu Jul 15 22:47:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.202 2021/07/15 22:42:46 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.203 2021/07/15 22:47:17 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.202 2021/07/15 22:42:46 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.203 2021/07/15 22:47:17 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -807,14 +807,15 @@
                        }
                        break;
                case DOUBLE:
-                       if (l == LONG) {
+                       if (l != LONG)
+                               break;
+                       /* FALLTHROUGH */
                case LDOUBLE:
-                               l = NOTSPEC;
-                               t = LDOUBLE;
-                               if (tflag)
-                                       /* 'long double' is illegal in ... */
-                                       warning(266);
-                       }
+                       l = NOTSPEC;
+                       t = LDOUBLE;
+                       if (tflag)
+                               /* 'long double' is illegal in ... */
+                               warning(266);
                        break;
                case DCOMPLEX:
                        if (l == LONG) {



Home | Main Index | Thread Index | Old Index