Opened 10 years ago

Closed 10 years ago

Last modified 5 years ago

#6624 closed defect (fixed)

SYMBIAN: WINTERMUTE: Warnings in base_package.cpp

Reported by: SF/superzanac Owned by: lordhoto
Priority: normal Component: Engine: Wintermute
Version: Keywords: has-pull-request
Cc: Game: Wintermute

Description

Scummvn 1.7.0 from today sources

Compilation warnings - dereferencing type-punned pointer will break strict-aliasing rules

Host platform - Win32, target plat - Symbian/ARM Compiler - GCCE 4.4.1 from Codesourcery for Symbian

Compiler's log:

/Symbian/Projects/SDL/scummvm/engines/wintermute/base/file/base_package.cpp: In function 'bool Wintermute::findPackageSignature(Common::SeekableReadStream, uint32)': /Symbian/Projects/SDL/scummvm/engines/wintermute/base/file/base_package.cpp:56: warning: dereferencing type-punned pointer will break strict-aliasing rules

Ticket imported from: bugs/6624.

Change History (3)

comment:1 by lordhoto, 10 years ago

Component: Engine: Wintermute
Game: Wintermute
Owner: set to lordhoto
Resolution: fixed
Status: newclosed
Summary: dereferencing type-punned pointer will break strict-aliasing rulesSYMBIAN: WINTERMUTE: Warnings in base_package.cpp

comment:2 by lordhoto, 10 years ago

I think this should be a false positive (byte, i.e. unsigned char can alias with any other tye IIRC). However, since the code in that function had another bug anyway I fixed it in a way which should not result in your compiler to warn about it.

See commit 257f9fd2aed29747cef578b00d6c92266c6aef56.

comment:3 by lolbot-iichan, 5 years ago

Keywords: has-pull-request added
Note: See TracTickets for help on using tickets.