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: reword message for very unlikely ....
details: https://anonhg.NetBSD.org/src/rev/9412753c83f7
branches: trunk
changeset: 954163:9412753c83f7
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Mar 30 15:10:46 2021 +0000
description:
lint: reword message for very unlikely .member in array initialization
diffstat:
tests/usr.bin/xlint/lint1/d_c99_init.exp | 2 +-
usr.bin/xlint/lint1/init.c | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r d46bef52e379 -r 9412753c83f7 tests/usr.bin/xlint/lint1/d_c99_init.exp
--- a/tests/usr.bin/xlint/lint1/d_c99_init.exp Tue Mar 30 15:07:53 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_init.exp Tue Mar 30 15:10:46 2021 +0000
@@ -2,7 +2,7 @@
d_c99_init.c(63): error: cannot initialize 'pointer to const void' from 'struct any' [185]
d_c99_init.c(80): error: too many array initializers, expected 3 [173]
d_c99_init.c(139): error: too many struct/union initializers [172]
-d_c99_init.c(145): error: syntax error 'named member must only be used with struct/union' [249]
+d_c99_init.c(145): error: syntax error 'designator '.member' is only for struct/union' [249]
d_c99_init.c(232): error: too many struct/union initializers [172]
d_c99_init.c(238): warning: illegal combination of integer (char) and pointer (pointer to char) [183]
d_c99_init.c(242): warning: illegal combination of integer (char) and pointer (pointer to char) [183]
diff -r d46bef52e379 -r 9412753c83f7 usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c Tue Mar 30 15:07:53 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c Tue Mar 30 15:10:46 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.180 2021/03/30 15:07:53 rillig Exp $ */
+/* $NetBSD: init.c,v 1.181 2021/03/30 15:10:46 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.180 2021/03/30 15:07:53 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.181 2021/03/30 15:10:46 rillig Exp $");
#endif
#include <stdlib.h>
@@ -452,10 +452,9 @@
return look_up_member_type(tp, dr->dr_name);
case ARRAY:
if (dr->dr_name != NULL) {
- /* TODO: reword; kept for compatibility */
/* syntax error '%s' */
error(249,
- "named member must only be used with struct/union");
+ "designator '.member' is only for struct/union");
}
return tp->t_subt;
default:
Home |
Main Index |
Thread Index |
Old Index