Skip to content
This repository was archived by the owner on Jul 22, 2018. It is now read-only.
This repository was archived by the owner on Jul 22, 2018. It is now read-only.

gcc warning with strict-aliasing [-Wstrict-aliasing] #128

@sergiomb2

Description

@sergiomb2

JFTR, it only happens in 3 places
RawSpeed/BitPumpMSB.h:51
RawSpeed/BitPumpMSB.h:86
RawSpeed/BitPumpMSB.h:124

rawspeed/RawSpeed/BitPumpMSB.h: In member function 'RawSpeed::uint32 RawSpeed::BitPumpMSB::peekBitsNoFill(RawSpeed::uint32)':
rawspeed/RawSpeed/BitPumpMSB.h:51:53: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
uint32 ret = (uint32)&current_buffer[shift>>3];
^
rawspeed/RawSpeed/BitPumpMSB.h: In member function 'RawSpeed::uint32 RawSpeed::BitPumpMSB::peekByteNoFill()':
rawspeed/RawSpeed/BitPumpMSB.h:86:52: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
uint32 ret = (uint32)&current_buffer[shift>>3];
^
rawspeed/RawSpeed/BitPumpMSB.h: In member function 'unsigned char RawSpeed::BitPumpMSB::getByte()':
rawspeed/RawSpeed/BitPumpMSB.h:124:54: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
uint32 ret = (uint32)&current_buffer[shift>>3];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions