[gstreamer-bugs] [Bug 590970] New: [souphttpsrc] better fix for compiler warning fix
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Thu Aug 6 09:11:15 PDT 2009
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=590970
GStreamer | gst-plugins-good | Ver: git
Summary: [souphttpsrc] better fix for compiler warning fix
Product: GStreamer
Version: git
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: blocker
Priority: Normal
Component: gst-plugins-good
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: t.i.m at zen.co.uk
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
This was committed presumably to work around bug #588771 (strict aliasing
compiler warnings):
commit 4e6fcd2345d208d029e46286c141a2f6b4ea5d7d
Author: Edward Hervey <bilboed at bilboed.com>
Date: Mon Jul 27 18:44:45 2009 +0200
soup: Use "GET" instead of SOUP_METHOD_GET. Fixes build (...)
(...)
diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
index c50fd3e..18b39b1 100644
--- a/ext/soup/gstsouphttpsrc.c
+++ b/ext/soup/gstsouphttpsrc.c
@@ -1101,7 +1101,7 @@ gst_soup_http_src_parse_status (SoupMessage * msg,
GstSoupHTTPSrc * src)
static gboolean
gst_soup_http_src_build_message (GstSoupHTTPSrc * src)
{
- src->msg = soup_message_new (SOUP_METHOD_GET, src->location);
+ src->msg = soup_message_new ("GET", src->location);
if (!src->msg) {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(NULL), ("Error parsing URL \"%s\"", src->location));
I'm not convinced this change is technically entirely correct, and think we
should try to fix this differently somehow so it doesn't come back to bite us
in future.
In particular, the way the API works:
- libsoup might now or in future rely on the
first argument to be an interned string
- libsoup might now or in future rely on the
exported symbol _SOUP_METHOD_GET having been
initialised to a valid, possibly interned,
string after soup_message_new() has been called
- libsoup might now or in future rely on being able
to do direct pointer comparisons between the
method string passed and e.g. _SOUP_METHOD_GET
I don't know if any of this is actually used, but that's the way the API works,
and we shouldn't just ignore that (and given the commit message I'm fairly sure
this wasn't checked). Until libsoup git is changed to something like #define
SOUP_METHOD_GET "GET" I'm tempted to think there's a reason for all this
inlining and variable initialising etc.
Since I haven't seen the warning myself with the version of libsoup that I
have, it'd be nice if someone who else who did have the warning could look for
a better fix.
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=590970.
More information about the Gstreamer-bugs
mailing list