Skip to content

t_local_cache_threading.c:85:12: error: incompatible pointer to integer conversion #807

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

Open
dawesc opened this issue Nov 21, 2024 · 0 comments

Comments

@dawesc
Copy link

dawesc commented Nov 21, 2024

Problem:

On MacOS using Homebrew I'm unable to compile with the following error:

[ 80%] Building C object tests/CMakeFiles/test_local_cache_threading.dir/integration/t_local_cache_threading.c.o
aws-encryption-sdk-c/tests/integration/t_local_cache_threading.c:85:12: error: incompatible pointer to integer conversion returning 'aws_thread_id_t' (aka 'struct _opaque_pthread_t *') from a function with result type 'unsigned long' [-Wint-conversion]
    return aws_thread_current_thread_id();
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Solution:

I propose to forcibly cast to the return type to unsigned long.

Out of scope:

Nothing

dawesc added a commit to EFTlab/aws-encryption-sdk-c that referenced this issue Nov 21, 2024
Unable to compile on Mac without a static cast to ensure the return
type of the thread id.
dawesc added a commit to EFTlab/aws-encryption-sdk-c that referenced this issue Nov 21, 2024
Unable to compile on Mac without a static cast to ensure the return
type of the thread id.
dawesc added a commit to EFTlab/aws-encryption-sdk-c that referenced this issue Nov 22, 2024
Unable to compile on Mac without a static cast to ensure the return
type of the thread id.
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

No branches or pull requests

1 participant