compiler warnings

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, LCMark

Post Reply
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2695
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

compiler warnings

Post by mwieder » Tue May 28, 2013 9:16 pm

I was about to start a new branch for eliminating some of the compiler warnings when I noticed the 03-May-2013 commit from runrevmark that reverts some of my changes. In particular I'm wondering at the moment about the changes to lnxmplayer.h and lnxmplayer.cpp. There are a few class properties that are declared as uint4 but are referenced as signed numbers, i.e.,

uint4 m_loudness (in lnxmplayer.h)

if (m_loudness == -1) (in getloudness at line 538 in mplayer.cpp)

I had changed the property to int4 rather than uint4, and I see it's gotten changed back to uint4 again. Wondering about the rationale for this.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 996
Joined: Thu Apr 11, 2013 11:27 am

Re: compiler warnings

Post by LCMark » Wed May 29, 2013 10:01 am

@mwieder: I did comment on the rationale for not including the mplayer changes in the github pull-request comments:
The warnings in lnxmplayer* I left as they were previously as they are a side-effect of some memory ownership bugs with regards the C strings the methods affected manipulate and thus I don't want to 'make them go away' until that is fixed properly.
However, it does seem I missed the loudness change - sorry about that - it should definitely be an int4 (as should duration and timescale by the looks of things).

In regards to general compiler warning clean-up then I'd prefer we wait until the refactor-syntax branch is merged into 'develop' (which is still a couple of months away). The reason here is that a lot of code has moved in this branch and integrating lots of small changes into it across lots of source-files is hugely time-consuming and fiddly - in the end we'd essentially end up doing the work twice which seems a little redundant.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2695
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: compiler warnings

Post by mwieder » Wed May 29, 2013 5:32 pm

we'd essentially end up doing the work twice which seems a little redundant.
You almost make that sound like a bad thing :-)
OK - I'll live with pages of compiler warnings until I get the go-ahead to proceed.
But do please revert those uint4s back to int4s, as that's more in the nature of a bug fix for an unreported bug.

Post Reply

Return to “Engine Contributors”