diff options
author | David Robillard <d@drobilla.net> | 2021-09-10 23:11:29 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-09-10 23:11:45 -0400 |
commit | 26b55feea8a43829f00d53bb6f3e95b18644eeea (patch) | |
tree | a5b830e7ce49cf4e07c41536d3d1294767f8b60a | |
parent | ada0bf69712db85431589d71ca2abf5ebffcf0ce (diff) | |
download | zix-26b55feea8a43829f00d53bb6f3e95b18644eeea.tar.gz zix-26b55feea8a43829f00d53bb6f3e95b18644eeea.tar.bz2 zix-26b55feea8a43829f00d53bb6f3e95b18644eeea.zip |
Avoid GCC recommending a const main
These warnings are useful in general, but are pointless with main functions and
annoying to avoid. Arbitrarily print something to make it go away.
-rw-r--r-- | test/strerror_test.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/test/strerror_test.c b/test/strerror_test.c index b5fd10f..0144852 100644 --- a/test/strerror_test.c +++ b/test/strerror_test.c @@ -7,10 +7,11 @@ #include "zix/common.h" #include <assert.h> +#include <stdio.h> #include <string.h> -static void -test_strerror(void) +int +main(void) { const char* msg = zix_strerror(ZIX_STATUS_SUCCESS); assert(!strcmp(msg, "Success")); @@ -25,12 +26,7 @@ test_strerror(void) msg = zix_strerror((ZixStatus)1000000); assert(!strcmp(msg, "Unknown error")); -} -ZIX_PURE_FUNC -int -main(void) -{ - test_strerror(); + printf("Success\n"); return 0; } |