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

Fix build under LLVM15 #601

Merged
merged 1 commit into from
Mar 17, 2023
Merged

Fix build under LLVM15 #601

merged 1 commit into from
Mar 17, 2023

Conversation

cschuber
Copy link

-Wint-conversion is now default with LLVM15. Fix the following -Wint-conversion error.

error: incompatible integer to pointer conversion passing 'uint64_t' (aka 'unsigned long') to parameter of type 'void ' [-Wint-conversion]
return _aso_casptr((void
*)p, o, n);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./FEATURE/aso:19:66: note: expanded from macro '_aso_casptr'
^~~~~~~~~~~
/wrkdirs/usr/ports/shells/ksh-devel/work/ksh-9bec2b78/src/lib/libast/aso/aso.c:839:10: error: incompatible integer to pointer conversion passing 'uint64_t' (aka 'unsigned long') to parameter of type 'void ' [-Wint-conversion]
return _aso_casptr((void
*)p, o, n);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./FEATURE/aso:19:78: note: expanded from macro '_aso_casptr'
^~~~~~~~~~~
2 errors generated.

-Wint-conversion is now default with LLVM15. Fix the following
-Wint-conversion error.

error: incompatible integer to pointer conversion passing 'uint64_t' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
                return _aso_casptr((void**)p, o, n);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./FEATURE/aso:19:66: note: expanded from macro '_aso_casptr'
                                                                      ^~~~~~~~~~~
/wrkdirs/usr/ports/shells/ksh-devel/work/ksh-9bec2b78/src/lib/libast/aso/aso.c:839:10: error: incompatible integer to pointer conversion passing 'uint64_t' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
                return _aso_casptr((void**)p, o, n);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./FEATURE/aso:19:78: note: expanded from macro '_aso_casptr'
                                                                                  ^~~~~~~~~~~
2 errors generated.
@JohnoKing
Copy link

I'll note that I just encountered this build error while trying to build using clang version 15.0.7 on Linux. I had to apply the fix from here manually to get ksh to build, since it's still not upstreamed.

@McDutchie
Copy link

I'll just merge this then, since it's now confirmed. Thanks for the PR!

@McDutchie McDutchie merged commit 237b6df into ksh93:dev Mar 17, 2023
McDutchie pushed a commit that referenced this pull request Mar 17, 2023
-Wint-conversion is now default with LLVM15. Fix the following
-Wint-conversion error.

error: incompatible integer to pointer conversion passing 'uint64_t' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
                return _aso_casptr((void**)p, o, n);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./FEATURE/aso:19:66: note: expanded from macro '_aso_casptr'
                                                                      ^~~~~~~~~~~
/wrkdirs/usr/ports/shells/ksh-devel/work/ksh-9bec2b78/src/lib/libast/aso/aso.c:839:10: error: incompatible integer to pointer conversion passing 'uint64_t' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
                return _aso_casptr((void**)p, o, n);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./FEATURE/aso:19:78: note: expanded from macro '_aso_casptr'
                                                                                  ^~~~~~~~~~~
2 errors generated.
@cschuber
Copy link
Author

Thanks.

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.

3 participants