From f2d87fa4efe05bbcc20fd9c4799083a40f6f5aac Mon Sep 17 00:00:00 2001 From: chrchr-github Date: Fri, 31 Jan 2025 21:06:21 +0100 Subject: [PATCH] Fix #13599 Bad configuration for std::clamp --- cfg/std.cfg | 6 +++--- test/cfg/std.c | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cfg/std.cfg b/cfg/std.cfg index e48b9c672b4..a5f8f9ce61f 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -6373,7 +6373,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun - + false @@ -6393,7 +6393,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun - + false @@ -6407,7 +6407,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun - + false diff --git a/test/cfg/std.c b/test/cfg/std.c index e4fa9db4a07..43a752473df 100644 --- a/test/cfg/std.c +++ b/test/cfg/std.c @@ -4897,6 +4897,11 @@ void ignoredReturnValue_abs(int i) abs(-100); } +int clamp(int, int, int, int); // #13599 +void ignoredReturnValue_clamp(int a, int b, int c, int d) { + clamp(a, b, c, d); // not a library function +} + void nullPointer_asctime(void) { const struct tm *tm = 0;