]> git.ozlabs.org Git - ccan/commitdiff
configurator: fix detection of deprecated attribute.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 14 Oct 2025 03:17:47 +0000 (13:47 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 14 Oct 2025 03:17:47 +0000 (13:47 +1030)
Do this by *not* referring to the deprecated function, so we don't give a warning.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
tools/configurator/configurator.c

index 4efeaba35ac5ad231ca8ccd588692b52fdcaca6d..085034fd0eecdc494c49e09a56bafb7df88f0628 100644 (file)
@@ -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; }" },