Skip to content

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

@dawesc

Description

@dawesc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions