Skip to content
This repository was archived by the owner on Aug 31, 2026. It is now read-only.
This repository was archived by the owner on Aug 31, 2026. It is now read-only.

strict aliasing warning in EsifApplicationInterface.cpp #5

Description

@vapier

building the project for CrOS yields this warning:

 * /build/x86-alex/tmp/portage/sys-power/dptf-8.0.5-r1/work/dptf-8.0.5/Products/DPTF/Sources/Manager/Manager/EsifApplicationInterface.cpp:86:65:
    warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

indeed the line in question is broken:

UInt32 getUInt32FromEsifDataGuidEvent(const esif::EsifDataPtr esifDataPtr) {
    ...
    UInt32 value = *((UInt32*)(esifDataGuidEvent->event_context));

probably want to use a union to avoid the issue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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