lint: remove redundant CONSTCOND
In do-while-0 loops, these are no longer needed since tree.c 1.202 from 2021-01-31.
This commit is contained in:
parent
6de49ab08a
commit
dd5ca14fc1
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tyname.c,v 1.39 2021/04/10 18:36:27 rillig Exp $ */
|
||||
/* $NetBSD: tyname.c,v 1.40 2021/04/18 17:47:32 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005 The NetBSD Foundation, Inc.
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: tyname.c,v 1.39 2021/04/10 18:36:27 rillig Exp $");
|
||||
__RCSID("$NetBSD: tyname.c,v 1.40 2021/04/18 17:47:32 rillig Exp $");
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
@ -54,7 +54,7 @@ __RCSID("$NetBSD: tyname.c,v 1.39 2021/04/10 18:36:27 rillig Exp $");
|
||||
do { \
|
||||
(void)warnx("%s, %d: " fmt, __FILE__, __LINE__, ##args); \
|
||||
abort(); \
|
||||
} while (/*CONSTCOND*/false)
|
||||
} while (false)
|
||||
#endif
|
||||
|
||||
/* A tree of strings. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lint1.h,v 1.99 2021/04/18 10:09:49 rillig Exp $ */
|
||||
/* $NetBSD: lint1.h,v 1.100 2021/04/18 17:47:32 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
|
||||
@ -76,7 +76,7 @@ typedef struct {
|
||||
curr_pos.p_uniq++; \
|
||||
if (curr_pos.p_file == csrc_pos.p_file) \
|
||||
csrc_pos.p_uniq++; \
|
||||
} while (/*CONSTCOND*/false)
|
||||
} while (false)
|
||||
|
||||
/*
|
||||
* Strings cannot be referenced to simply by a pointer to its first
|
||||
@ -456,7 +456,7 @@ typedef struct err_set {
|
||||
do { \
|
||||
if (!(cond)) \
|
||||
assert_failed(__FILE__, __LINE__, __func__, #cond); \
|
||||
} while (/*CONSTCOND*/false)
|
||||
} while (false)
|
||||
|
||||
#ifdef BLKDEBUG
|
||||
#define ZERO 0xa5
|
||||
@ -480,7 +480,7 @@ check_printf(const char *fmt, ...)
|
||||
do { \
|
||||
check_printf(__CONCAT(MSG_, msgid), ##args); \
|
||||
(func)(msgid, pos, ##args); \
|
||||
} while (/*CONSTCOND*/false)
|
||||
} while (false)
|
||||
|
||||
# define error_at(msgid, pos, args...) \
|
||||
wrap_check_printf_at(error_at, msgid, pos, ##args)
|
||||
@ -493,7 +493,7 @@ check_printf(const char *fmt, ...)
|
||||
do { \
|
||||
check_printf(__CONCAT(MSG_, msgid), ##args); \
|
||||
(func)(msgid, ##args); \
|
||||
} while (/*CONSTCOND*/false)
|
||||
} while (false)
|
||||
|
||||
# define error(msgid, args...) wrap_check_printf(error, msgid, ##args)
|
||||
# define warning(msgid, args...) wrap_check_printf(warning, msgid, ##args)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tree.c,v 1.278 2021/04/18 09:53:03 rillig Exp $ */
|
||||
/* $NetBSD: tree.c,v 1.279 2021/04/18 17:47:32 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Jochen Pohl
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: tree.c,v 1.278 2021/04/18 09:53:03 rillig Exp $");
|
||||
__RCSID("$NetBSD: tree.c,v 1.279 2021/04/18 17:47:32 rillig Exp $");
|
||||
#endif
|
||||
|
||||
#include <float.h>
|
||||
@ -4154,7 +4154,7 @@ cat_strings(strg_t *strg1, strg_t *strg2)
|
||||
strg1->F = xrealloc(strg1->F, len * sizeof(*strg1->F)); \
|
||||
(void)memcpy(strg1->F + len1, strg2->F, len2 * sizeof(*strg1->F)); \
|
||||
free(strg2->F); \
|
||||
} while (/*CONSTCOND*/false)
|
||||
} while (false)
|
||||
|
||||
if (strg1->st_tspec == CHAR)
|
||||
COPY(st_cp);
|
||||
|
Loading…
Reference in New Issue
Block a user