#3858: Warnings from -Wcast-align
--------------------------+------------------------------------
Reporter: Per | Owner:
Type: bug | Status: new
Priority: normal | Milestone: unspecified
Component: Build system | Version: git/master
Keywords: warnings | Blocked By:
Blocking: | Operating System: GNU/Linux 32bit
--------------------------+------------------------------------
Trying to compile Warzone on a Raspberry Pi. Got these warnings (sorry
about the messy formatting):
./../../3rdparty/miniupnpc/miniupnpc.c: In function âupnpDiscoverâ:
../../../3rdparty/miniupnpc/miniupnpc.c:482:29: error: cast increases
required alignment of target type [-Werror=cast-align]
../../../3rdparty/miniupnpc/miniupnpc.c:488:28: error: cast increases
required alignment of target type [-Werror=cast-align]
../../../3rdparty/miniupnpc/miniupnpc.c:569:5: error: cast increases
required alignment of target type [-Werror=cast-align]
../../../lib/script/codeprint.cpp:217:47: error: cast from âUBYTE* {aka
unsigned char*}â to âINTERP_VAL*â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:690:14: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:698:13: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:700:13: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:708:13: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:710:13: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:714:14: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:746:14: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:750:14: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:754:14: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:758:14: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:762:14: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:766:14: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:770:14: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:774:14: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:778:14: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp: In function âbool
NETrecvGAMESTRUCT(GAMESTRUCT*)â:
../../../lib/netplay/netplay.cpp:840:56: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:847:48: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:849:49: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:857:54: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:859:58: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:863:57: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:895:56: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:897:56: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:899:49: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:901:46: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:903:42: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:905:44: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:907:44: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:909:45: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp:911:45: error: cast from âchar*â to
âuint32_t* {aka unsigned int*}â increases required alignment of target
type [-Werror=cast-align]
../../../lib/netplay/netplay.cpp: In function âbool NETjoinGame(const
char*, uint32_t, const char*)â:
../../../lib/netplay/netplay.cpp:2885:13: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/netplay/netplay.cpp:2887:13: error: cast from âchar*â to
âint32_t* {aka int*}â increases required alignment of target type [-Werror
=cast-align]
../../../lib/sdl/scrap.cpp: In function âint convert_data(int, char*,
char*, int)â:
../../../lib/sdl/scrap.cpp:186:12: error: cast from âchar*â to âint*â
increases required alignment of target type [-Werror=cast-align]
../../../lib/sdl/scrap.cpp: In function âint convert_scrap(int, char*,
char*, int)â:
../../../lib/sdl/scrap.cpp:252:19: error: cast from âchar*â to âint*â
increases required alignment of target type [-Werror=cast-align]
../../src/design.cpp: In function âUDWORD intNumAvailable(UBYTE*, UDWORD,
COMPONENT_STATS*, UDWORD)â:
../../src/design.cpp:1987:66: error: cast from âUBYTE* {aka unsigned
char*}â to âCOMPONENT_STATS*â increases required alignment of target type
[-Werror=cast-align]
../../src/design.cpp: In function âbool
intAddComponentButtons(COMPONENT_STATS*, UDWORD, UBYTE*, UDWORD, UDWORD,
UDWORD)â:
../../src/design.cpp:2249:67: error: cast from âUBYTE* {aka unsigned
char*}â to âCOMPONENT_STATS*â increases required alignment of target type
[-Werror=cast-align]
../../src/design.cpp:2262:68: error: cast from âUBYTE* {aka unsigned
char*}â to âCOMPONENT_STATS*â increases required alignment of target type
[-Werror=cast-align]
../../src/design.cpp:2346:66: error: cast from âUBYTE* {aka unsigned
char*}â to âCOMPONENT_STATS*â increases required alignment of target type
[-Werror=cast-align]
../../src/design.cpp: In function âbool intAddExtraSystemButtons(UDWORD,
UDWORD, UDWORD, UDWORD, UDWORD)â:
../../src/design.cpp:2456:68: error: cast from âUBYTE* {aka unsigned
char*}â to âCOMPONENT_STATS*â increases required alignment of target type
[-Werror=cast-align]
../../src/design.cpp:2514:67: error: cast from âUBYTE* {aka unsigned
char*}â to âCOMPONENT_STATS*â increases required alignment of target type
[-Werror=cast-align]
As I turned the warning off, there might be more, but compiling the whole
thing takes approx 1.5 hours on this box, so not running it again now to
get them all.
--
Ticket URL: <http://developer.wz2100.net/ticket/3858>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project