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: use stronger wording in comments o...
details: https://anonhg.NetBSD.org/src/rev/fa14d0fe14a6
branches: trunk
changeset: 373261:fa14d0fe14a6
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Jan 28 00:46:14 2023 +0000
description:
lint: use stronger wording in comments of unimplemented offsetof
diffstat:
usr.bin/xlint/lint1/tree.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r a760f97864a8 -r fa14d0fe14a6 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Sat Jan 28 00:39:49 2023 +0000
+++ b/usr.bin/xlint/lint1/tree.c Sat Jan 28 00:46:14 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.497 2023/01/28 00:39:49 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.498 2023/01/28 00:46:14 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.497 2023/01/28 00:39:49 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.498 2023/01/28 00:46:14 rillig Exp $");
#endif
#include <float.h>
@@ -3785,7 +3785,7 @@
/*
* Create a constant node for offsetof.
*/
-/* ARGSUSED */ /* See implementation comments. */
+/* ARGSUSED */ /* FIXME: See implementation comments. */
tnode_t *
build_offsetof(const type_t *tp, const sym_t *sym)
{
@@ -3796,7 +3796,7 @@
/* unacceptable operand of '%s' */
error(111, "offsetof");
- /* XXX: wrong size, no checking for sym fixme */
+ /* FIXME: Don't wrongly use the size of the whole type, use sym. */
offset_in_bytes = type_size_in_bits(tp) / CHAR_SIZE;
tn = build_integer_constant(SIZEOF_TSPEC, offset_in_bytes);
tn->tn_system_dependent = true;
Home |
Main Index |
Thread Index |
Old Index