Skip to content
Snippets Groups Projects
Commit 4bc17345 authored by Andre McCurdy's avatar Andre McCurdy
Browse files

CheckFunctionExists.c: avoid gcc warnings with -Wstrict-prototypes


Avoid warnings (and therefore build failures etc) if a user happens
to add -Wstrict-prototypes to CFLAGS.

 | $ gcc --version
 | gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
 |
 | $ gcc -Wstrict-prototypes -Werror -DCHECK_FUNCTION_EXISTS=pthread_create -o foo.o -c Modules/CheckFunctionExists.c
 | Modules/CheckFunctionExists.c:7:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
 |    CHECK_FUNCTION_EXISTS();
 |    ^
 | cc1: all warnings being treated as errors
 |

Signed-off-by: default avatarAndre McCurdy <armccurdy@gmail.com>
parent 0d818632
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
extern "C"
#endif
char
CHECK_FUNCTION_EXISTS();
CHECK_FUNCTION_EXISTS(void);
#ifdef __CLASSIC_C__
int main()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment