Module Name: src
Committed By: rillig
Date: Thu Sep 26 20:08:02 UTC 2024
Modified Files:
src/tests/usr.bin/xlint/lint1: msg_236.c
Log Message:
tests/lint: demonstrate wrong warning for constructor function
Seen in jemalloc.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_236.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/xlint/lint1/msg_236.c
diff -u src/tests/usr.bin/xlint/lint1/msg_236.c:1.5 src/tests/usr.bin/xlint/lint1/msg_236.c:1.6
--- src/tests/usr.bin/xlint/lint1/msg_236.c:1.5 Fri Jul 7 19:45:22 2023
+++ src/tests/usr.bin/xlint/lint1/msg_236.c Thu Sep 26 20:08:02 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: msg_236.c,v 1.5 2023/07/07 19:45:22 rillig Exp $ */
+/* $NetBSD: msg_236.c,v 1.6 2024/09/26 20:08:02 rillig Exp $ */
# 3 "msg_236.c"
// Test for message: static function '%s' unused [236]
@@ -20,3 +20,10 @@ static inline void
inline_function(void)
{
}
+
+__attribute__((__constructor__))
+static void
+/* expect+1: warning: static function 'constructor_function' unused [236] */
+constructor_function(void)
+{
+}