GNOME Bugzilla – Bug 645595
bytereader, bytewriter: fix warnings when using inline functions with g++
Last modified: 2011-03-23 22:07:24 UTC
g++ complains when compiling a file including: #include <gst/base/gstbytewriter.h> #include <gst/base/gstbytereader.h> .../include/gstreamer-0.10/gst/base/gstbytereader.h: In function ‘guint8* gst_byte_reader_dup_data_unchecked(GstByteReader*, guint)’: .../include/gstreamer-0.10/gst/base/gstbytereader.h:249:75: error: invalid conversion from ‘void*’ to ‘guint8*’ .../include/gstreamer-0.10/gst/base/gstbytewriter.h: In function ‘gboolean _gst_byte_writer_ensure_free_space_inline(GstByteWriter*, guint)’: .../include/gstreamer-0.10/gst/base/gstbytewriter.h:196:75: error: invalid conversion from ‘void*’ to ‘guint8*’
Created attachment 184155 [details] [review] [gstbyte{read,writ}er] fix build with g++ Added a couple of missing casts reported by g++ when it compiles a file including the gstbytereader.h and gstbytewriter.h headers. Fixes
Created attachment 184156 [details] [review] [gstbyte{read,writ}er] fix build with g++ Added a couple of missing casts reported by g++ when it compiles a file including the gstbytereader.h and gstbytewriter.h headers. Fixes
Didn't I fix this already? commit 6c2741941804f8297d2073fa173fe44bdd99d7ec Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Sat Mar 12 16:58:01 2011 +0000 bytereader, bytewriter: fix up inline functions to make g++ happy gstbytereader.h: In function ‘guint8* gst_byte_reader_dup_data_unchecked(GstByteReader*, guint)’: gstbytereader.h:249:75: error: invalid conversion from ‘void*’ to ‘guint8*’ gstbytewriter.h: In function ‘gboolean _gst_byte_writer_ensure_free_space_inline(GstByteWriter*, guint)’: gstbytewriter.h:196:75: error: invalid conversion from ‘void*’ to ‘guint8*’
Oh nevermind, this is in a branch, never cherry-picked those into master.
Since it's a trivial patch, I took the liberty of just cherry-picking the one I had already instead of applying yours (less work, I'm lazy). Hope you don't mind.. commit f9558b163fab74d97a747823d2abede31f343871 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Sat Mar 12 17:01:39 2011 +0000 tests: add libscpp unit test to make sure g++ likes our library headers commit 5300a5e73b1c20958e3a348003e750d5be50930c Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Sat Mar 12 16:58:01 2011 +0000 bytereader, bytewriter: fix up inline functions to make g++ happy gstbytereader.h: In function ‘guint8* gst_byte_reader_dup_data_unchecked(GstByteReader*, guint)’: gstbytereader.h:249:75: error: invalid conversion from ‘void*’ to ‘guint8*’ gstbytewriter.h: In function ‘gboolean _gst_byte_writer_ensure_free_space_inline(GstByteWriter*, guint)’: gstbytewriter.h:196:75: error: invalid conversion from ‘void*’ to ‘guint8*’ https://bugzilla.gnome.org/show_bug.cgi?id=645595
No problem as long as the issue is fixed, thanks Tim.