lint: extend a few message comments

This commit is contained in:
rillig 2021-01-17 16:25:30 +00:00
parent 8e597c87a3
commit a7193cf24a
3 changed files with 12 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: decl.c,v 1.126 2021/01/17 15:24:03 rillig Exp $ */
/* $NetBSD: decl.c,v 1.127 2021/01/17 16:25:30 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.126 2021/01/17 15:24:03 rillig Exp $");
__RCSID("$NetBSD: decl.c,v 1.127 2021/01/17 16:25:30 rillig Exp $");
#endif
#include <sys/param.h>
@ -406,7 +406,7 @@ tdeferr(type_t *td, tspec_t t)
case LONG:
if (t2 == INT || t2 == UINT || t2 == LONG || t2 == ULONG ||
t2 == FLOAT || t2 == DOUBLE || t2 == DCOMPLEX) {
/* modifying typedef with ... */
/* modifying typedef with '%s'; only qualifiers ... */
warning(5, "long");
if (t2 == INT) {
td = gettyp(LONG);
@ -826,7 +826,7 @@ deftyp(void)
}
} else if (dcs->d_ctx == ARG || dcs->d_ctx == PARG) {
if (scl != NOSCL && scl != REG) {
/* only register valid ... */
/* only register valid as formal parameter storage... */
error(9);
scl = NOSCL;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lint1.h,v 1.57 2021/01/16 16:53:23 rillig Exp $ */
/* $NetBSD: lint1.h,v 1.58 2021/01/17 16:25:30 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@ -154,7 +154,7 @@ struct type {
bool t_const : 1; /* const modifier */
bool t_volatile : 1; /* volatile modifier */
bool t_proto : 1; /* function prototype (t_args valid) */
bool t_vararg : 1; /* prototype with ... */
bool t_vararg : 1; /* prototype with '...' */
bool t_typedef : 1; /* type defined with typedef */
bool t_bitfield : 1;
bool t_isenum : 1; /* type is (or was) enum (t_enum valid) */

View File

@ -1,4 +1,4 @@
/* $NetBSD: tree.c,v 1.176 2021/01/17 16:19:54 rillig Exp $ */
/* $NetBSD: tree.c,v 1.177 2021/01/17 16:25:30 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.176 2021/01/17 16:19:54 rillig Exp $");
__RCSID("$NetBSD: tree.c,v 1.177 2021/01/17 16:25:30 rillig Exp $");
#endif
#include <float.h>
@ -464,7 +464,6 @@ struct_or_union_member(tnode_t *tn, op_t op, sym_t *msym)
error(103);
}
} else {
/* left operand of "->" must be pointer to ... */
if (tflag && tn->tn_type->t_tspec == PTR) {
/* left operand of '->' must be pointer ... */
warning(104, type_name(tn->tn_type));
@ -886,7 +885,7 @@ typeok_shr(const mod_t *mp,
*/
if (hflag &&
(ln->tn_op != CON || ln->tn_val->v_quad < 0)) {
/* semantics of '%s' change in ANSI C; ... */
/* semantics of '%s' change in ANSI C; use ... */
warning(118, mp->m_name);
}
} else if (!tflag && !sflag && !is_uinteger(olt) && !is_uinteger(ort) &&
@ -2953,7 +2952,7 @@ plength(type_t *tp)
error(110);
break;
case VOID:
/* cannot do pointer arithmetic on operand of ... */
/* cannot do pointer arithmetic on operand of unknown size */
gnuism(136);
break;
case STRUCT:
@ -2979,7 +2978,7 @@ plength(type_t *tp)
}
if (elem == 0 && elsz != 0) {
/* cannot do pointer arithmetic on operand of ... */
/* cannot do pointer arithmetic on operand of unknown size */
error(136);
}
@ -3493,7 +3492,7 @@ cast(tnode_t *tn, type_t *tp)
} else if (nt == PTR && ot == PTR) {
if (!tp->t_subt->t_const && tn->tn_type->t_subt->t_const) {
if (hflag)
/* cast discards 'const' from ... */
/* cast discards 'const' from pointer tar... */
warning(275);
}
} else {