Skip to content

Many compilation warnings when compiling under lp64 data model with -Wconversion option #1462

Open
@GFWisshit

Description

@GFWisshit

Hi guys.
osal/src/os/shared/inc\os-shared-idmap.h:257:38: warning: implicit conversion loses integer precision: 'unsigned long' to 'osal_objtype_t' (aka 'unsigned int') [-Wshorten-64-to-32]
return (OS_ObjectIdToInteger(id) >> OS_OBJECT_TYPE_SHIFT);

image
image
The return value type of OS_ObjectIdToInteger is unsigned long and the return type of OS_ObjectIdToType_Impl is uint32_t, which causes an implicit conversion and causes the compiler to complain.Will this warning be fixed?

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