#22 √ invalid
John Croisant

"Cast from pointer" warnings on x86_64

Reported by John Croisant | August 15th, 2008 @ 03:59 PM | in Surface & Rect

When compiling on x86_64, the following warnings are given:


Compiling rubygame/rubygame_surface.c
ext/rubygame/rubygame_surface.c: In function ‘rbgm_surface_get_colorkey’:
ext/rubygame/rubygame_surface.c:336: warning: cast from pointer to integer of different size
ext/rubygame/rubygame_surface.c: In function ‘rbgm_surface_getat’:
ext/rubygame/rubygame_surface.c:621: warning: cast to pointer from integer of different size

The offending code in both cases is: "if((int *)color == NULL)".

The code should be restructured to eliminate the comparisons.

  • For colorkey, the surface's flags should be checked for the presence or absence of the colorkey flag to determine whether a colorkey is set.

  • For get_at, the comparison and block can probably be removed entirely.

Comments and changes to this ticket

  • John Croisant

    John Croisant August 16th, 2008 @ 03:49 PM

    • → Tag changed from “!lowpriority @bug color surface” to “!duplicate @bug color surface”
    • → State changed from “new” to “invalid”

    Oops, I forgot about #21. Closing this one.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Flexible library for making games with the Ruby language.

rubygame.sourceforge.net

Shared Ticket Bins

People watching this ticket

You can update this ticket by sending an email to from your email client. (help)