From f2e7f24daaa43c0927130b6ed02c3ed17689b3ca Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 6 Sep 2024 13:36:15 +0200 Subject: Work around a gcc warning It seems that annotating sprintf with `write` makes gcc unhappy, as its analyser is unable to understand that we're checking if `__b != -1` before calling `__orig_snprintf`, so let's comment this annotation for now. --- tests/test_sprintf.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/test_sprintf.c (limited to 'tests/test_sprintf.c') diff --git a/tests/test_sprintf.c b/tests/test_sprintf.c new file mode 100644 index 0000000..edde838 --- /dev/null +++ b/tests/test_sprintf.c @@ -0,0 +1,8 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { + char buffer[12] = {0}; + sprintf(buffer, "%s", "1234567"); +} -- cgit v1.3