Fix a bunch of compile warnings shown with Forte.
authorJan Schmidt <thaytan@mad.scientist.com>
Mon, 17 Sep 2007 17:24:55 +0000 (17:24 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Mon, 17 Sep 2007 17:24:55 +0000 (17:24 +0000)
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_init),
(gst_text_overlay_set_property):
* ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet):
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
* gst-libs/gst/rtp/gstrtcpbuffer.c: (gst_rtcp_ntp_to_unix),
(gst_rtcp_unix_to_ntp):
* gst-libs/gst/rtsp/gstrtspmessage.c: (gst_rtsp_message_get_type):
* gst/playback/gstqueue2.c:
* tests/examples/seek/seek.c: (set_scale):
Fix a bunch of compile warnings shown with Forte.
* gst/audiorate/gstaudiorate.c:
Always pull in config.h before including any system headers.

ChangeLog
ext/pango/gsttextoverlay.c
ext/vorbis/vorbisdec.c
gst-libs/gst/audio/gstbaseaudiosink.c
gst-libs/gst/rtp/gstrtcpbuffer.c
gst-libs/gst/rtsp/gstrtspmessage.c
gst/audiorate/gstaudiorate.c
gst/playback/gstqueue2.c
tests/examples/seek/seek.c

index d673920..140f7ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2007-09-17  Jan Schmidt  <Jan.Schmidt@sun.com>
+
+       * ext/pango/gsttextoverlay.c: (gst_text_overlay_init),
+       (gst_text_overlay_set_property):
+       * ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet):
+       * gst-libs/gst/audio/gstbaseaudiosink.c:
+       (gst_base_audio_sink_render):
+       * gst-libs/gst/rtp/gstrtcpbuffer.c: (gst_rtcp_ntp_to_unix),
+       (gst_rtcp_unix_to_ntp):
+       * gst-libs/gst/rtsp/gstrtspmessage.c: (gst_rtsp_message_get_type):
+       * gst/playback/gstqueue2.c:
+       * tests/examples/seek/seek.c: (set_scale):
+       Fix a bunch of compile warnings shown with Forte.
+
+       * gst/audiorate/gstaudiorate.c:
+       Always pull in config.h before including any system headers.
+
 2007-09-17  Wim Taymans  <wim.taymans@gmail.com>
 
        * gst/playback/gstqueue2.c: (update_buffering),
index 98687e6..804eeae 100644 (file)
@@ -487,7 +487,8 @@ gst_text_overlay_init (GstTextOverlay * overlay, GstTextOverlayClass * klass)
   overlay->line_align = DEFAULT_PROP_LINE_ALIGNMENT;
   overlay->layout =
       pango_layout_new (GST_TEXT_OVERLAY_GET_CLASS (overlay)->pango_context);
-  pango_layout_set_alignment (overlay->layout, overlay->line_align);
+  pango_layout_set_alignment (overlay->layout,
+      (PangoAlignment) overlay->line_align);
   memset (&overlay->bitmap, 0, sizeof (overlay->bitmap));
 
   overlay->halign = DEFAULT_PROP_HALIGNMENT;
@@ -685,7 +686,8 @@ gst_text_overlay_set_property (GObject * object, guint prop_id,
       break;
     case PROP_LINE_ALIGNMENT:
       overlay->line_align = g_value_get_enum (value);
-      pango_layout_set_alignment (overlay->layout, overlay->line_align);
+      pango_layout_set_alignment (overlay->layout,
+          (PangoAlignment) overlay->line_align);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
index bdde284..fc8b9d7 100644 (file)
@@ -913,7 +913,7 @@ vorbis_handle_data_packet (GstVorbisDec * vd, ogg_packet * packet)
   guint sample_count;
   GstBuffer *out;
   GstFlowReturn result;
-  GstClockTime timestamp = -1, nextts;
+  GstClockTime timestamp = GST_CLOCK_TIME_NONE, nextts;
   gint size;
 
   if (!vd->initialized)
index 51a0bba..d3dcfa0 100644 (file)
@@ -884,7 +884,7 @@ gst_base_audio_sink_render (GstBaseSink * bsink, GstBuffer * buf)
   gint bps;
   gint accum;
   gint out_samples;
-  GstClockTime base_time = -1, latency;
+  GstClockTime base_time = GST_CLOCK_TIME_NONE, latency;
   GstClock *clock;
   gboolean sync, slaved, align_next;
 
index 422cf57..e2847c9 100644 (file)
@@ -1637,7 +1637,7 @@ gst_rtcp_ntp_to_unix (guint64 ntptime)
 
   /* conversion from NTP timestamp (seconds since 1900) to seconds since
    * 1970. */
-  unixtime = ntptime - (2208988800LL << 32);
+  unixtime = ntptime - (2208988800ULL << 32);
   /* conversion to nanoseconds */
   unixtime = gst_util_uint64_scale (unixtime, GST_SECOND, (1LL << 32));
 
@@ -1666,7 +1666,7 @@ gst_rtcp_unix_to_ntp (guint64 unixtime)
   ntptime = gst_util_uint64_scale (unixtime, (1LL << 32), GST_SECOND);
   /* conversion from UNIX timestamp (seconds since 1970) to NTP (seconds
    * since 1900). */
-  ntptime += (2208988800LL << 32);
+  ntptime += (2208988800ULL << 32);
 
   return ntptime;
 }
index 10f1ff2..297cdc3 100644 (file)
@@ -132,7 +132,7 @@ gst_rtsp_message_init (GstRTSPMessage * msg)
 GstRTSPMsgType
 gst_rtsp_message_get_type (GstRTSPMessage * msg)
 {
-  g_return_val_if_fail (msg != NULL, GST_RTSP_EINVAL);
+  g_return_val_if_fail (msg != NULL, GST_RTSP_MESSAGE_INVALID);
 
   return msg->type;
 }
index c1bd285..88ad972 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
-#include <stdlib.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+
 #include <string.h>
+#include <stdlib.h>
 
 #include <gst/gst.h>
 #include <gst/audio/audio.h>
index d478cda..437f44d 100644 (file)
@@ -320,7 +320,7 @@ static GstFlowReturn gst_queue_chain (GstPad * pad, GstBuffer * buffer);
 static GstFlowReturn gst_queue_bufferalloc (GstPad * pad, guint64 offset,
     guint size, GstCaps * caps, GstBuffer ** buf);
 static gboolean gst_queue_acceptcaps (GstPad * pad, GstCaps * caps);
-static gboolean gst_queue_push_one (GstQueue * queue);
+static GstFlowReturn gst_queue_push_one (GstQueue * queue);
 static void gst_queue_loop (GstPad * pad);
 
 static gboolean gst_queue_handle_sink_event (GstPad * pad, GstEvent * event);
index 1a30e87..3cff77f 100644 (file)
@@ -1032,11 +1032,15 @@ static gboolean stop_seek (GtkWidget * widget, GdkEventButton * event,
 static void
 set_scale (gdouble value)
 {
-  g_signal_handlers_block_by_func (hscale, start_seek, pipeline);
-  g_signal_handlers_block_by_func (hscale, stop_seek, pipeline);
+  g_signal_handlers_block_by_func (hscale, (void *) start_seek,
+      (void *) pipeline);
+  g_signal_handlers_block_by_func (hscale, (void *) stop_seek,
+      (void *) pipeline);
   gtk_adjustment_set_value (adjustment, value);
-  g_signal_handlers_unblock_by_func (hscale, start_seek, pipeline);
-  g_signal_handlers_unblock_by_func (hscale, stop_seek, pipeline);
+  g_signal_handlers_unblock_by_func (hscale, (void *) start_seek,
+      (void *) pipeline);
+  g_signal_handlers_unblock_by_func (hscale, (void *) stop_seek,
+      (void *) pipeline);
   gtk_widget_queue_draw (hscale);
 }