diff options
| author | jvoisin | 2024-09-06 13:36:15 +0200 |
|---|---|---|
| committer | jvoisin | 2024-09-06 13:38:22 +0200 |
| commit | f2e7f24daaa43c0927130b6ed02c3ed17689b3ca (patch) | |
| tree | 360f799b6b3fa5a6e5f4837980e5f9831b6c5a64 /tests/test_sprintf.c | |
| parent | 114b563adc2b942bc5abd4c5820507076d453f64 (diff) | |
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.
Diffstat (limited to 'tests/test_sprintf.c')
| -rw-r--r-- | tests/test_sprintf.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <stdio.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | char buffer[12] = {0}; | ||
| 7 | sprintf(buffer, "%s", "1234567"); | ||
| 8 | } | ||
