Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeLists: do not enforce strict prototypes on Windows. #581

Merged
merged 1 commit into from Apr 16, 2020

Conversation

Jehan
Copy link

@Jehan Jehan commented Apr 15, 2020

Recent commit 053eaa6 broke Mingw-w64 builds:

On Windows, or at least when cross-built with Mingw-w64, build fails
because strict prototype fails on an included file (thus nothing we can
do about in json-c code):

from /home/jehan/dev/src/json-c/json_util.c:44:
/home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:196:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
196 | typedef INT_PTR (WINAPI *FARPROC) ();
| ^~~~~~~
/home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:197:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
197 | typedef INT_PTR (WINAPI *NEARPROC) ();
| ^~~~~~~
/home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:198:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
198 | typedef INT_PTR (WINAPI *PROC) ();
| ^~~~~~~

Let's just disable the errors for Windows build.

On Windows, or at least when cross-built with Mingw-w64, build fails
because strict prototype fails on an included file (thus nothing we can
do about in json-c code):

> from /home/jehan/dev/src/json-c/json_util.c:44:
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:196:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
>   196 |   typedef INT_PTR (WINAPI *FARPROC) ();
>       |   ^~~~~~~
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:197:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
>   197 |   typedef INT_PTR (WINAPI *NEARPROC) ();
>       |   ^~~~~~~
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:198:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
>   198 |   typedef INT_PTR (WINAPI *PROC) ();
>       |   ^~~~~~~

Let's just disable the errors for Windows build.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 84.597% when pulling 8c33d1c on Jehan:wip/Jehan/no-strict-prototypes-windows into 7fb8d56 on json-c:master.

@hawicz hawicz merged commit 04bb0fc into json-c:master Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants