Skip to content

Commit

Permalink
Adjust neco_main specifiers to remove warnings
Browse files Browse the repository at this point in the history
Remove the static inline specifier from the __neco_main signature
to avoid old-style-declaration warning when -Wextra is provided.
  • Loading branch information
tidwall committed Apr 25, 2024
1 parent 2c3852d commit d5d9d4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions neco.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,10 @@ ssize_t neco_stream_buffered_write_size(neco_stream *stream);
#include <stdlib.h>

#define neco_main \
static inline __neco_main0(int argc, char *argv[]); \
__neco_main(int argc, char *argv[]); \
static void _neco_main(int argc, void *argv[]) { \
(void)argc; \
__neco_exit_prog(__neco_main0(*(int*)argv[0], *(char***)argv[1])); \
__neco_exit_prog(__neco_main(*(int*)argv[0], *(char***)argv[1])); \
} \
int main(int argc, char *argv[]) { \
neco_env_setpaniconerror(true); \
Expand All @@ -434,7 +434,7 @@ int main(int argc, char *argv[]) { \
fprintf(stderr, "neco_start: %s (code %d)\n", neco_strerror(ret), ret); \
return -1; \
}; \
int static inline __neco_main0
int __neco_main

////////////////////////////////////////////////////////////////////////////////
// private functions, not to be call directly
Expand Down

0 comments on commit d5d9d4f

Please sign in to comment.