[BeOS] Make gfx/src/beos compile under gcc4

RESOLVED INVALID

Status

enhancement
RESOLVED INVALID
11 years ago
8 years ago

People

(Reporter: thesuckiestemail, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

3.63 KB, patch
thesuckiestemail
: review?
sergei_d
Details | Diff | Splinter Review
Reporter

Description

11 years ago
Fixes casting issues in gfx/src/beos. This should only be added to 1.8 branch.

r?
Reporter

Comment 1

11 years ago
Attachment #306118 - Flags: review?(sergei_d)
Reporter

Updated

11 years ago
OS: Linux → BeOS

Comment 2

11 years ago
Tqh, can you explain me what is that problem more detailed?

Because by definition:
void SetFamilyAndStyle(const font_family family), not (char* family)

yes we know for headers, that it is actually typedef for char*,

but such way it looks bit strange and is not so nice from poper programming ideology.

Reporter

Comment 3

11 years ago
It's worse font_family is defined as char[64]. You can't cast in gcc4 to char[]. 

So this is the quick fix. The real fix should probably be to actually do the char copy to a char[64] array.

Comment 4

11 years ago
> It's worse font_family is defined as char[64]. You can't cast in gcc4 to
> char[]. 
> 
I see.
> So this is the quick fix. The real fix should probably be to actually do the
> char copy to a char[64] array.
> 
That's looks like good way. As I experienced (and somewhat fixed) various crashes in past in gfx/beos just related to access to font_family etc in that form - as pointer to "system-belonging" char array.

I agree to review patch, if you add comment with //XXX or //TODO  - about idea to create local copy from those arrays.

Reporter

Comment 5

11 years ago
I can do that. I suspect it will never be fixed though, as they are already pushing for removing gfx/srx/beos.
Product: Core → Core Graveyard
We don't support BeOS any more.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
In the graveyard, code referred to doesn't exist to be fixed.
You need to log in before you can comment on or make changes to this bug.