Opened 11 years ago

Last modified 11 years ago

#353 new defect

type-punned pointer

Reported by: ph3-der-loewe Owned by:
Priority: medium Milestone:
Component: µRoarD Version: current
Keywords: Cc:
Architecture: Compiler: gcc/mingw
Difficulty: hard Kernel:
Operating System: Parent Tickets:
Patch attached: no Protocol: RoarAudio
Sound driver: Topic: Porting

Description (last modified by ph3-der-loewe)

Error message from compiler:

clients.c: In function 'muroard_client_handle':
clients.c:254:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clients.c:261:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clients.c:264:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clients.c:264:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clients.c:274:11: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clients.c:285:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
clients.c: In function 'muroard_client_handle_caps':
clients.c:746:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Suggested solution:
Ensure alignment of buffer and if needed update casts.

Subtickets

Change History (1)

comment:1 Changed 11 years ago by ph3-der-loewe

  • Description modified (diff)
Note: See TracTickets for help on using tickets.