From: Rusty Russell Date: Tue, 14 Oct 2025 03:17:47 +0000 (+1030) Subject: configurator: fix detection of deprecated attribute. X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=873ae156ecf52762653b730080a3ecf07c7dafd0;p=ccan configurator: fix detection of deprecated attribute. Do this by *not* referring to the deprecated function, so we don't give a warning. Signed-off-by: Rusty Russell --- diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index 4efeaba3..085034fd 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -137,8 +137,8 @@ static const struct test base_tests[] = { "DEFINES_FUNC", NULL, NULL, "static int __attribute__((const)) func(int x) { return x; }" }, { "HAVE_ATTRIBUTE_DEPRECATED", "__attribute__((deprecated)) support", - "DEFINES_FUNC", NULL, NULL, - "static int __attribute__((deprecated)) func(int x) { return x; }" }, + "OUTSIDE_MAIN", NULL, NULL, + "int __attribute__((deprecated)) depr(int x);" }, { "HAVE_ATTRIBUTE_NONNULL", "__attribute__((nonnull)) support", "DEFINES_FUNC", NULL, NULL, "static char *__attribute__((nonnull)) func(char *p) { return p; }" },