After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 151877 - [PATCH] Fix bad casts in ximagesink.c
[PATCH] Fix bad casts in ximagesink.c
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.8.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-09-05 04:08 UTC by Nathan Robertson
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
cast pointers using GPOINTER_TO_INT(), not (int). (1.01 KB, patch)
2004-09-05 04:09 UTC, Nathan Robertson
none Details | Review

Description Nathan Robertson 2004-09-05 04:08:10 UTC
Another amd64 / 64 bit specific patch. In three places pointers are casted to
type (int). This should be using the GPOINTER_TO_INT() macro. Not doing so causes:

 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../gst-libs -I../../gst-libs -pthread
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/home/nathanr/bin/gnome2-cvs/include/glib-2.0
-I/home/nathanr/bin/gnome2-cvs/lib64/glib-2.0/include
-I/home/nathanr/bin/gnome2-cvs/include/libxml2
-I/home/nathanr/bin/gnome2-cvs/include/gstreamer-0.8 -DGST_DISABLE_DEPRECATED
-Wall -Werror -I/usr/X11R6/include -g -O2 -MT libgstximagesink_la-ximagesink.lo
-MD -MP -MF .deps/libgstximagesink_la-ximagesink.Tpo -c ximagesink.c  -fPIC
-DPIC -o .libs/libgstximagesink_la-ximagesink.o
ximagesink.c: In function `gst_ximagesink_check_xshm_calls':
ximagesink.c:140: warning: cast from pointer to integer of different size
ximagesink.c: In function `gst_ximagesink_ximage_new':
ximagesink.c:217: warning: cast from pointer to integer of different size
ximagesink.c: In function `gst_ximagesink_ximage_destroy':
ximagesink.c:280: warning: cast from pointer to integer of different size
make[3]: *** [libgstximagesink_la-ximagesink.lo] Error 1
make[3]: Leaving directory `/home/nathanr/download/gnome-cvs/gst-plugins/sys/ximage'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/nathanr/download/gnome-cvs/gst-plugins/sys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nathanr/download/gnome-cvs/gst-plugins'
make: *** [all] Error 2
*** error during stage build of gst-plugins: could not build module *** [70/91]

Fixed with patch I'll attach in a follow-up.
Comment 1 Nathan Robertson 2004-09-05 04:09:43 UTC
Created attachment 31282 [details] [review]
cast pointers using GPOINTER_TO_INT(), not (int).
Comment 2 David Schleef 2004-09-10 18:31:12 UTC
These need to be tested for equality with ((void *)-1), not (int)-1.  Fixed.