summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorJosep Torra Valles <josep@fluendo.com>2006-10-16 18:22:47 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-10-16 18:22:47 +0000
commitc4e7ebfe356a19362b261b285af171be525156c1 (patch)
treeb0da2130a117e9128597f90dedeed9337063f65b /gst
parentafef1cdc2a521b17d6af508497984350fde1175d (diff)
Fix a bunch of problems discovered by the Forte compiler, mostly type mixups and pointer arithmetics with void pointe...
Original commit message from CVS: Patch by: Josep Torra Valles <josep at fluendo com> * ext/cairo/gsttimeoverlay.c: (gst_cairo_time_overlay_transform): * ext/esd/esdsink.c: (gst_esdsink_write): * ext/flac/gstflacdec.c: (gst_flac_dec_length), (gst_flac_dec_read_seekable), (gst_flac_dec_chain), (gst_flac_dec_send_newsegment): * ext/flac/gstflacenc.c: (gst_flac_enc_seek_callback), (gst_flac_enc_tell_callback): * ext/jpeg/smokecodec.c: (find_best_size), (smokecodec_encode), (smokecodec_parse_header), (smokecodec_decode): * gst/avi/gstavimux.c: (gst_avi_mux_write_avix_index): * gst/debug/efence.c: (gst_fenced_buffer_alloc): * gst/goom/Makefile.am: * gst/goom/gstgoom.c: * gst/icydemux/gsticydemux.c: (gst_icydemux_typefind_or_forward): * gst/rtsp/gstrtspsrc.c: * gst/rtsp/rtspconnection.c: (rtsp_connection_read): * gst/udp/gstudpsink.c: * gst/udp/gstudpsrc.c: * gst/wavparse/gstwavparse.c: (gst_wavparse_change_state): * sys/sunaudio/gstsunaudiomixertrack.h: Fix a bunch of problems discovered by the Forte compiler, mostly type mixups and pointer arithmetics with void pointers. Fixes #362603.
Diffstat (limited to 'gst')
-rw-r--r--gst/avi/gstavimux.c2
-rw-r--r--gst/debug/efence.c6
-rw-r--r--gst/goom/Makefile.am2
-rw-r--r--gst/goom/gstgoom.c4
-rw-r--r--gst/icydemux/gsticydemux.c2
-rw-r--r--gst/rtsp/gstrtspsrc.c2
-rw-r--r--gst/rtsp/rtspconnection.c10
-rw-r--r--gst/udp/gstudpsink.c2
-rw-r--r--gst/udp/gstudpsrc.c2
-rw-r--r--gst/wavparse/gstwavparse.c4
10 files changed, 20 insertions, 16 deletions
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index 1f1eb276..57c8ffbf 100644
--- a/gst/avi/gstavimux.c
+++ b/gst/avi/gstavimux.c
@@ -1109,7 +1109,7 @@ gst_avi_mux_write_avix_index (GstAviMux * avimux, guchar * code,
/* msb is set if not (!) keyframe */
GST_WRITE_UINT32_LE (buffdata + 4, GUINT32_FROM_LE (entry->size)
| (GUINT32_FROM_LE (entry->flags)
- & GST_RIFF_IF_KEYFRAME ? 0 : 1 << 31));
+ & GST_RIFF_IF_KEYFRAME ? 0 : 1U << 31));
buffdata += 8;
}
i--;
diff --git a/gst/debug/efence.c b/gst/debug/efence.c
index 94eed9eb..d77afbb0 100644
--- a/gst/debug/efence.c
+++ b/gst/debug/efence.c
@@ -473,7 +473,7 @@ gst_fenced_buffer_alloc (GstBuffer * buffer, unsigned int length,
fenced_buffer->length = alloc_size - page_size;
#else
mprotect (region, page_size, PROT_NONE);
- mprotect (region + alloc_size - page_size, page_size, PROT_NONE);
+ mprotect ((char *) region + alloc_size - page_size, page_size, PROT_NONE);
fenced_buffer->region = region;
fenced_buffer->length = alloc_size;
@@ -487,9 +487,9 @@ gst_fenced_buffer_alloc (GstBuffer * buffer, unsigned int length,
/* Align to top of region, but force alignment to 4 bytes */
offset = alloc_size - page_size - length;
offset &= ~0x3;
- return region + offset;
+ return (void *) ((char *) region + offset);
} else {
- return region + page_size;
+ return (void *) ((char *) region + page_size);
}
}
diff --git a/gst/goom/Makefile.am b/gst/goom/Makefile.am
index c265a84f..ce0891fe 100644
--- a/gst/goom/Makefile.am
+++ b/gst/goom/Makefile.am
@@ -7,7 +7,7 @@ noinst_HEADERS = gstgoom.h filters.h goom_core.h goom_tools.h graphic.h lines.h
libgstgoom_la_SOURCES = gstgoom.c goom_core.c $(GOOM_FILTER_FILES) graphic.c lines.c
-libgstgoom_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GOOM_FILTER_CFLAGS)
+libgstgoom_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS)
libgstgoom_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS)
libgstgoom_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c
index 26334316..19b38c91 100644
--- a/gst/goom/gstgoom.c
+++ b/gst/goom/gstgoom.c
@@ -95,8 +95,8 @@ static GstFlowReturn gst_goom_chain (GstPad * pad, GstBuffer * buffer);
static gboolean gst_goom_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_goom_sink_event (GstPad * pad, GstEvent * event);
-static GstPadLinkReturn gst_goom_sink_setcaps (GstPad * pad, GstCaps * caps);
-static GstPadLinkReturn gst_goom_src_setcaps (GstPad * pad, GstCaps * caps);
+static gboolean gst_goom_sink_setcaps (GstPad * pad, GstCaps * caps);
+static gboolean gst_goom_src_setcaps (GstPad * pad, GstCaps * caps);
static GstElementClass *parent_class = NULL;
diff --git a/gst/icydemux/gsticydemux.c b/gst/icydemux/gsticydemux.c
index dd775665..fd7e1a15 100644
--- a/gst/icydemux/gsticydemux.c
+++ b/gst/icydemux/gsticydemux.c
@@ -429,7 +429,7 @@ gst_icydemux_typefind_or_forward (GstICYDemux * icydemux, GstBuffer * buf)
if (icydemux->typefinding) {
GstBuffer *tf_buf;
GstCaps *caps;
- guint prob;
+ GstTypeFindProbability prob;
if (icydemux->typefind_buf) {
icydemux->typefind_buf = gst_buffer_join (icydemux->typefind_buf, buf);
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 47917535..e698f6ad 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -2222,7 +2222,7 @@ open_failed:
/*** GSTURIHANDLER INTERFACE *************************************************/
-static guint
+static GstURIType
gst_rtspsrc_uri_get_type (void)
{
return GST_URI_SRC;
diff --git a/gst/rtsp/rtspconnection.c b/gst/rtsp/rtspconnection.c
index 27cc3ebb..9466db7c 100644
--- a/gst/rtsp/rtspconnection.c
+++ b/gst/rtsp/rtspconnection.c
@@ -40,6 +40,10 @@
* SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
@@ -60,6 +64,10 @@
#include <arpa/inet.h>
#endif
+#ifdef HAVE_FIONREAD_IN_SYS_FILIO
+#include <sys/filio.h>
+#endif
+
#include "rtspconnection.h"
/* the select call is also performed on the control sockets, that way
@@ -542,7 +550,7 @@ rtsp_connection_read (RTSPConnection * conn, gpointer data, guint size)
goto read_error;
} else {
toread -= bytes;
- data += bytes;
+ data = (char *) data + bytes;
}
}
return RTSP_OK;
diff --git a/gst/udp/gstudpsink.c b/gst/udp/gstudpsink.c
index 382e9195..f647e60c 100644
--- a/gst/udp/gstudpsink.c
+++ b/gst/udp/gstudpsink.c
@@ -200,7 +200,7 @@ gst_udpsink_get_property (GObject * object, guint prop_id, GValue * value,
/*** GSTURIHANDLER INTERFACE *************************************************/
-static guint
+static GstURIType
gst_udpsink_uri_get_type (void)
{
return GST_URI_SINK;
diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c
index 73a0151c..23e2721e 100644
--- a/gst/udp/gstudpsrc.c
+++ b/gst/udp/gstudpsrc.c
@@ -838,7 +838,7 @@ gst_udpsrc_stop (GstBaseSrc * bsrc)
/*** GSTURIHANDLER INTERFACE *************************************************/
-static guint
+static GstURIType
gst_udpsrc_uri_get_type (void)
{
return GST_URI_SRC;
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c
index 7ac9bc54..4f61437e 100644
--- a/gst/wavparse/gstwavparse.c
+++ b/gst/wavparse/gstwavparse.c
@@ -1964,10 +1964,6 @@ gst_wavparse_change_state (GstElement * element, GstStateChange transition)
GstStateChangeReturn ret;
GstWavParse *wav = GST_WAVPARSE (element);
- GST_DEBUG_OBJECT (wav, "changing state %s - %s",
- gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
- gst_element_state_get_name (GST_STATE_TRANSITION_NEXT (transition)));
-
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
break;