Opened 11 years ago

Closed 11 years ago

Last modified 5 years ago

#6625 closed defect (fixed)

SYMBIAN: WINTERMUTE: Symbian Compilation Warnings

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/scriptables/script_ext_file.cpp: In member function 'virtual bool Wintermute::SXFile::scCallMethod(Wintermute::ScScript, Wintermute::ScStack, Wintermute::ScStack, const char)': /Symbian/Projects/SDL/scummvm/engines/wintermute/base/scriptables/script_ext_file.cpp:446: warning: dereferencing type-punned pointer will break strict-aliasing rules

Ticket imported from: bugs/6625.

Change History (9)

comment:1 by digitall, 11 years ago

Summary: script_ext_file.cpp:446: warning: dereferencing type-punned pointer will break strict-aliasing rulesWINTERMUTE: Symbian Compilation Warnings

comment:2 by digitall, 11 years ago

Taken from bug #6626, this also occurs here as well: /Symbian/Projects/SDL/scummvm/engines/wintermute/base/scriptables/script.cpp: In member function 'double Wintermute::ScScript::getFloat()': /Symbian/Projects/SDL/scummvm/engines/wintermute/base/scriptables/script.cpp:491: warning: dereferencing type-punned pointer will break strict-aliasing rules

comment:3 by digitall, 11 years ago

zanac: In future, it is best to give the exact git id of the source code you are compiling from. I assume this was around 386596ca9670ce159a6c07811b739ba73376abcf.

comment:4 by digitall, 11 years ago

The first warning at script_ext_file.cpp:446 is associated with reading a float as an LE uint32:

Not sure how we will avoid that warning or rewrite this...

comment:5 by digitall, 11 years ago

The second warning at script.cpp:491 is similar, associated with recasting a double/float from a byte array:

comment:6 by digitall, 11 years ago

OH FFS.. Sigh. Best to look at the source of those lines as Sourceforge's markdown is f*cking up the preformatted source lines... despite following their instructions for preformatted text. SIGH.

comment:7 by lordhoto, 11 years ago

Owner: set to lordhoto
Resolution: fixed
Status: newclosed

comment:8 by lordhoto, 11 years ago

Should be gone with b6b6d39992c46139adb8c5c1898c8cf517e934e4.

comment:9 by lolbot-iichan, 5 years ago

Keywords: has-pull-request added
Summary: WINTERMUTE: Symbian Compilation WarningsSYMBIAN: WINTERMUTE: Symbian Compilation Warnings
Note: See TracTickets for help on using tickets.