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

quickjs-libc: fix incompatible pointer error with gcc 14 #2836

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

1480c1
Copy link
Contributor

@1480c1 1480c1 commented May 12, 2024

gcc 14 promoted -Wincompatible-pointer-types to an error and now shows

src/quickjs/quickjs-libc.c:3376:49: error: passing argument 2 of 'GetExitCodeProcess' from incompatible pointer type [-Wincompatible-pointer-types]
 3376 |                 GetExitCodeProcess(pi.hProcess, &ret);
      |                                                 ^~~~
      |                                                 |
      |                                                 int *

gcc 14 promoted -Wincompatible-pointer-types to an error and now shows

```c
src/quickjs/quickjs-libc.c:3376:49: error: passing argument 2 of 'GetExitCodeProcess' from incompatible pointer type [-Wincompatible-pointer-types]
 3376 |                 GetExitCodeProcess(pi.hProcess, &ret);
      |                                                 ^~~~
      |                                                 |
      |                                                 int *
```

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
@rbouqueau
Copy link
Member

Thank you. Actually the modified code was copied from quickjs so it would seem logical to also modify the upstream if not done already.

I checked and it seems quickjs is available and actively maintained on a git repository at https://github.com/bellard/quickjs/. Maybe GPAC could change the way it integrates quickjs?

@1480c1
Copy link
Contributor Author

1480c1 commented May 14, 2024

I believe that the changes here do not apply to upstream as they do not use GetExitCodeProcess(), and thus they don't encounter the same issue. Rather, it seems like these changes are due to the mentioned - added MSVC support for most 'os' functions (most importantly exec, waitpid and kill) feature specific to this version of quickjs

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

2 participants