summaryrefslogtreecommitdiffstats
path: root/testutil/perror-all.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-12-05 20:10:48 +0100
committerMattias Andrée <maandree@kth.se>2023-12-05 20:10:48 +0100
commit6d77b155bcd4725e09837604e6ea86f5f124ba9c (patch)
tree7cfdf466bb94bbbe3e7929432bc048da5eaa2349 /testutil/perror-all.c
parentSecond commit (diff)
downloadlibsyscalls-6d77b155bcd4725e09837604e6ea86f5f124ba9c.tar.gz
libsyscalls-6d77b155bcd4725e09837604e6ea86f5f124ba9c.tar.bz2
libsyscalls-6d77b155bcd4725e09837604e6ea86f5f124ba9c.tar.xz
Third commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'testutil/perror-all.c')
-rw-r--r--testutil/perror-all.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/testutil/perror-all.c b/testutil/perror-all.c
index 2b37cff..d7ee45b 100644
--- a/testutil/perror-all.c
+++ b/testutil/perror-all.c
@@ -4,13 +4,20 @@
#include <stddef.h>
#include <stdio.h>
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wunsafe-buffer-usage" /* clang is just being silly */
+#endif
+
int
-main(int argc, char *argv[])
+main(int argc, char **argv)
{
size_t i, count;
- (void) argc;
+ if (argc < 1 || argc > 2) {
+ fprintf(stderr, "usage error\n");
+ return 3;
+ }
#define X(...) 1
count = (LIBSYSCALLS_LIST_ERRORS(X, +));