Opened 15 years ago

Closed 15 years ago

Last modified 17 months ago

#2087 closed defect (fixed)

SAGA: compile warnings

Reported by: eriktorbjorn Owned by: anotherguest
Priority: normal Component: Engine: SAGA
Keywords: Cc:
Game:

Description

With the latest CVS snapshot, I get the following warnings - repeated several times - while compiling the SAGA engine with GCC 3.4.2:

./saga/gfx.h:39: warning: ignoring packed attribute on unpacked non-POD field `Common::Rect Saga::ClipData::sourceRect' ./saga/gfx.h:40: warning: ignoring packed attribute on unpacked non-POD field `Common::Rect Saga::ClipData::destRect' ./saga/gfx.h:41: warning: ignoring packed attribute on unpacked non-POD field `Common::Point Saga::ClipData::destPoint' ./saga/gfx.h:44: warning: ignoring packed attribute on unpacked non-POD field `Common::Point Saga::ClipData::drawSource' ./saga/gfx.h:45: warning: ignoring packed attribute on unpacked non-POD field `Common::Point Saga::ClipData::drawDest'

The ClipData struct is packed, but the way I read these warning messages we still cannot make any assumptions about the size and exact layout of it. This could be bad, but on the other side I'm not sure I can see anywhere where the clip data needs to be packed...

I haven't checked if the other two structs that are now packed, PalEntry and Color. They don't contain any unpacked members. We still can't make any assuptions about Color, though, since it uses the "int" data type.

Ticket imported from: #1235591. Ticket imported from: bugs/2087.

Change History (6)

comment:1 by eriktorbjorn, 15 years ago

Owner: set to anotherguest

comment:2 by anotherguest, 15 years ago

You are right. Its probably only PalEntry which is needing the GCC_PACK, and I will try that, and if it works, remove the GCC_PACK on the Color struct

comment:3 by anotherguest, 15 years ago

Now removed packed attribute on the Color struct, and it works fine. Hopefully everything should be fine now.

comment:4 by anotherguest, 15 years ago

Status: newclosed

comment:5 by eriktorbjorn, 15 years ago

Resolution: fixed

comment:6 by digitall, 17 months ago

Component: Engine: SAGA
Note: See TracTickets for help on using tickets.