From 38a7b96780197bf6558ce1f85b91bf004f710785 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 22 Apr 2005 14:24:30 +0000 Subject: First set of GCC4 compiler fixes. Original commit message from CVS: Reviewed by: Ronald S. Bultje * examples/seeking/cdplayer.c: (query_durations), (query_positions), (main): * examples/seeking/playbin.c: (main): * examples/seeking/seek.c: (query_durations_elems), (query_durations_pads), (query_positions_elems), (query_positions_pads), (main): * examples/seeking/spider_seek.c: (query_durations), (query_positions), (main): * gst-libs/gst/idct/idct.c: (gst_idct_int_sparse_idct): * gst-libs/gst/media-info/media-info.c: (gst_media_info_read): * gst-libs/gst/xwindowlistener/xwindowlistener.c: (gst_xwin_refresh): * gst/alpha/gstalpha.c: (gst_alpha_chroma_key_ayuv), (gst_alpha_chroma_key_i420): * gst/apetag/apedemux.c: (gst_ape_demux_parse_tags): * gst/asfdemux/gstasfdemux.c: (gst_asf_demux_process_comment), (gst_asf_demux_process_ext_content_desc): * gst/audioconvert/gstchannelmix.c: (gst_audio_convert_fill_one_other): * gst/auparse/gstauparse.c: (gst_auparse_chain): * gst/avi/gstavidemux.c: (gst_avi_demux_stream_data): * gst/avi/gstavidemux.h: * gst/avi/gstavimux.c: (gst_avimux_vidsinkconnect), (gst_avimux_do_audio_buffer), (gst_avimux_do_video_buffer): * gst/colorspace/yuv2rgb.c: (number_of_bits_set), (free_bits_at_top), (free_bits_at_bottom): * gst/effectv/gstdice.c: (gst_dicetv_draw): * gst/effectv/gstwarp.c: (gst_warptv_setup): * gst/festival/gstfestival.c: (gst_festival_chain): * gst/flx/gstflxdec.c: (flx_decode_chunks): * gst/games/gstvideoimage.c: (paint_setup_I420), (paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY), (paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B), (paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9), (paint_setup_YUV9), (paint_setup_xRGB8888), (paint_setup_xBGR8888), (paint_setup_RGBx8888), (paint_setup_BGRx8888), (paint_setup_RGB888), (paint_setup_BGR888), (paint_setup_RGB565), (paint_setup_xRGB1555): * gst/games/gstvideoimage.h: * gst/goom/filters.c: (zoomFilterFastRGB): * gst/goom/goom_core.c: (goom_close): * gst/goom/graphic.c: * gst/law/mulaw-encode.c: (gst_mulawenc_chain): * gst/level/demo.c: (setup_gui): * gst/librfb/rfbdecoder.c: (rfb_decoder_state_wait_for_protocol_version): * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_index), (gst_matroska_demux_parse_blockgroup): * gst/matroska/matroska-mux.c: (gst_matroska_mux_create_uid): * gst/monoscope/monoscope.c: (monoscope_init): * gst/mpeg1sys/gstmpeg1systemencode.c: (gst_system_encode_multiplex): * gst/mpeg2sub/gstmpeg2subt.c: (gst_mpeg2subt_merge_title), (gst_mpeg2subt_handle_dvd_event): * gst/mpegaudio/encoder.h: * gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_chain): * gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_sync_stream_to_time): * gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_sync_stream_to_time), (gst_mpeg_demux_handle_src_event): * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_handle_discont), (index_seek), (normal_seek), (gst_mpeg_parse_handle_src_event): * gst/multipart/multipartdemux.c: (gst_multipart_demux_chain): * gst/playback/gstplaybasebin.c: (setup_source): * gst/playback/test.c: (gen_video_element), (gen_audio_element): * gst/playback/test3.c: (update_scale): * gst/realmedia/rmdemux.c: (re_get_pascal_string): * gst/rtjpeg/RTjpeg.c: (RTjpeg_compressYUV420), (RTjpeg_compressYUV422), (RTjpeg_decompressYUV422), (RTjpeg_decompressYUV420), (RTjpeg_mcompress): * gst/rtp/gstrtpL16enc.c: (gst_rtpL16enc_chain): * gst/synaesthesia/synaescope.c: (synaescope32), (init_synaescope), (synaesthesia_close): * gst/tcp/fdsetstress.c: (mess_some_more): * gst/vbidec/vbidata.c: (vbidata_new_file), (vbidata_new_line): * sys/glsink/glimagesink.c: (gst_glimagesink_xcontext_get): * sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls), (gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy): * sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls), (gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy): * testsuite/multifilesink/fakesrc_test.c: (test_format), (test_signal): * testsuite/multifilesink/lame_test.c: (test_format), (test_signal): * testsuite/multifilesink/oggtheora_test.c: (test_format), (test_signal): * testsuite/multifilesink/oggvorbis_test.c: (test_format), (test_signal): * testsuite/multifilesink/wavenc_test.c: (test_format), (test_signal): First set of GCC4 compiler fixes. --- ChangeLog | 97 ++++++++++++++++++++++++++ examples/seeking/cdplayer.c | 10 +-- examples/seeking/playbin.c | 6 +- examples/seeking/seek.c | 14 ++-- examples/seeking/spider_seek.c | 10 +-- gst-libs/gst/idct/idct.c | 2 +- gst-libs/gst/media-info/media-info.c | 2 +- gst-libs/gst/xwindowlistener/xwindowlistener.c | 2 +- gst/apetag/apedemux.c | 4 +- gst/colorspace/yuv2rgb.c | 9 +-- gst/festival/gstfestival.c | 4 +- gst/flx/gstflxdec.c | 3 +- gst/games/gstvideoimage.c | 40 +++++------ gst/games/gstvideoimage.h | 2 +- gst/librfb/rfbdecoder.c | 2 +- gst/mpeg1sys/gstmpeg1systemencode.c | 2 +- gst/mpeg2sub/gstmpeg2subt.c | 3 +- gst/mpegaudioparse/gstmpegaudioparse.c | 2 +- gst/rtjpeg/RTjpeg.c | 24 +++---- gst/vbidec/vbidata.c | 8 +-- sys/glsink/glimagesink.c | 2 +- 21 files changed, 172 insertions(+), 76 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a8c92d2..28d3e5ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,100 @@ +2005-04-22 Kjartan Maraas + + Reviewed by: Ronald S. Bultje + + * examples/seeking/cdplayer.c: (query_durations), + (query_positions), (main): + * examples/seeking/playbin.c: (main): + * examples/seeking/seek.c: (query_durations_elems), + (query_durations_pads), (query_positions_elems), + (query_positions_pads), (main): + * examples/seeking/spider_seek.c: (query_durations), + (query_positions), (main): + * gst-libs/gst/idct/idct.c: (gst_idct_int_sparse_idct): + * gst-libs/gst/media-info/media-info.c: (gst_media_info_read): + * gst-libs/gst/xwindowlistener/xwindowlistener.c: + (gst_xwin_refresh): + * gst/alpha/gstalpha.c: (gst_alpha_chroma_key_ayuv), + (gst_alpha_chroma_key_i420): + * gst/apetag/apedemux.c: (gst_ape_demux_parse_tags): + * gst/asfdemux/gstasfdemux.c: (gst_asf_demux_process_comment), + (gst_asf_demux_process_ext_content_desc): + * gst/audioconvert/gstchannelmix.c: + (gst_audio_convert_fill_one_other): + * gst/auparse/gstauparse.c: (gst_auparse_chain): + * gst/avi/gstavidemux.c: (gst_avi_demux_stream_data): + * gst/avi/gstavidemux.h: + * gst/avi/gstavimux.c: (gst_avimux_vidsinkconnect), + (gst_avimux_do_audio_buffer), (gst_avimux_do_video_buffer): + * gst/colorspace/yuv2rgb.c: (number_of_bits_set), + (free_bits_at_top), (free_bits_at_bottom): + * gst/effectv/gstdice.c: (gst_dicetv_draw): + * gst/effectv/gstwarp.c: (gst_warptv_setup): + * gst/festival/gstfestival.c: (gst_festival_chain): + * gst/flx/gstflxdec.c: (flx_decode_chunks): + * gst/games/gstvideoimage.c: (paint_setup_I420), + (paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY), + (paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B), + (paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9), + (paint_setup_YUV9), (paint_setup_xRGB8888), (paint_setup_xBGR8888), + (paint_setup_RGBx8888), (paint_setup_BGRx8888), + (paint_setup_RGB888), (paint_setup_BGR888), (paint_setup_RGB565), + (paint_setup_xRGB1555): + * gst/games/gstvideoimage.h: + * gst/goom/filters.c: (zoomFilterFastRGB): + * gst/goom/goom_core.c: (goom_close): + * gst/goom/graphic.c: + * gst/law/mulaw-encode.c: (gst_mulawenc_chain): + * gst/level/demo.c: (setup_gui): + * gst/librfb/rfbdecoder.c: + (rfb_decoder_state_wait_for_protocol_version): + * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_index), + (gst_matroska_demux_parse_blockgroup): + * gst/matroska/matroska-mux.c: (gst_matroska_mux_create_uid): + * gst/monoscope/monoscope.c: (monoscope_init): + * gst/mpeg1sys/gstmpeg1systemencode.c: + (gst_system_encode_multiplex): + * gst/mpeg2sub/gstmpeg2subt.c: (gst_mpeg2subt_merge_title), + (gst_mpeg2subt_handle_dvd_event): + * gst/mpegaudio/encoder.h: + * gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_chain): + * gst/mpegstream/gstdvddemux.c: + (gst_dvd_demux_sync_stream_to_time): + * gst/mpegstream/gstmpegdemux.c: + (gst_mpeg_demux_sync_stream_to_time), + (gst_mpeg_demux_handle_src_event): + * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_handle_discont), + (index_seek), (normal_seek), (gst_mpeg_parse_handle_src_event): + * gst/multipart/multipartdemux.c: (gst_multipart_demux_chain): + * gst/playback/gstplaybasebin.c: (setup_source): + * gst/playback/test.c: (gen_video_element), (gen_audio_element): + * gst/playback/test3.c: (update_scale): + * gst/realmedia/rmdemux.c: (re_get_pascal_string): + * gst/rtjpeg/RTjpeg.c: (RTjpeg_compressYUV420), + (RTjpeg_compressYUV422), (RTjpeg_decompressYUV422), + (RTjpeg_decompressYUV420), (RTjpeg_mcompress): + * gst/rtp/gstrtpL16enc.c: (gst_rtpL16enc_chain): + * gst/synaesthesia/synaescope.c: (synaescope32), (init_synaescope), + (synaesthesia_close): + * gst/tcp/fdsetstress.c: (mess_some_more): + * gst/vbidec/vbidata.c: (vbidata_new_file), (vbidata_new_line): + * sys/glsink/glimagesink.c: (gst_glimagesink_xcontext_get): + * sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls), + (gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy): + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls), + (gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy): + * testsuite/multifilesink/fakesrc_test.c: (test_format), + (test_signal): + * testsuite/multifilesink/lame_test.c: (test_format), + (test_signal): + * testsuite/multifilesink/oggtheora_test.c: (test_format), + (test_signal): + * testsuite/multifilesink/oggvorbis_test.c: (test_format), + (test_signal): + * testsuite/multifilesink/wavenc_test.c: (test_format), + (test_signal): + First set of GCC4 compiler fixes. + 2005-04-22 Thomas Vander Stichele * gst/silence/gstsilence.c: (gst_silence_change_state): diff --git a/examples/seeking/cdplayer.c b/examples/seeking/cdplayer.c index 21fa302d..5532e68c 100644 --- a/examples/seeking/cdplayer.c +++ b/examples/seeking/cdplayer.c @@ -60,7 +60,7 @@ static seek_format seek_formats[] = { G_GNUC_UNUSED static void -query_durations () +query_durations (void) { GList *walk = seekable_elements; @@ -89,7 +89,7 @@ query_durations () } G_GNUC_UNUSED static void -query_positions () +query_positions (void) { GList *walk = seekable_elements; @@ -267,11 +267,11 @@ main (int argc, char **argv) gtk_scale_set_digits (GTK_SCALE (hscale), 2); gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "button_press_event", G_CALLBACK (start_seek), pipeline); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "button_release_event", G_CALLBACK (stop_seek), pipeline); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "format_value", G_CALLBACK (format_value), pipeline); /* do the packing stuff ... */ diff --git a/examples/seeking/playbin.c b/examples/seeking/playbin.c index b6ff35b8..b213c5fc 100644 --- a/examples/seeking/playbin.c +++ b/examples/seeking/playbin.c @@ -225,11 +225,11 @@ main (int argc, char **argv) gtk_scale_set_digits (GTK_SCALE (hscale), 2); gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "button_press_event", G_CALLBACK (start_seek), pipeline); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "button_release_event", G_CALLBACK (stop_seek), pipeline); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "format_value", G_CALLBACK (format_value), pipeline); /* do the packing stuff ... */ diff --git a/examples/seeking/seek.c b/examples/seeking/seek.c index fdd7c45d..d4a269fb 100644 --- a/examples/seeking/seek.c +++ b/examples/seeking/seek.c @@ -663,7 +663,7 @@ query_rates (void) } G_GNUC_UNUSED static void -query_durations_elems () +query_durations_elems (void) { GList *walk = seekable_elements; @@ -693,7 +693,7 @@ query_durations_elems () } G_GNUC_UNUSED static void -query_durations_pads () +query_durations_pads (void) { GList *walk = seekable_pads; @@ -723,7 +723,7 @@ query_durations_pads () } G_GNUC_UNUSED static void -query_positions_elems () +query_positions_elems (void) { GList *walk = seekable_elements; @@ -753,7 +753,7 @@ query_positions_elems () } G_GNUC_UNUSED static void -query_positions_pads () +query_positions_pads (void) { GList *walk = seekable_pads; @@ -1035,11 +1035,11 @@ main (int argc, char **argv) gtk_scale_set_digits (GTK_SCALE (hscale), 2); gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "button_press_event", G_CALLBACK (start_seek), pipeline); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "button_release_event", G_CALLBACK (stop_seek), pipeline); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "format_value", G_CALLBACK (format_value), pipeline); /* do the packing stuff ... */ diff --git a/examples/seeking/spider_seek.c b/examples/seeking/spider_seek.c index d63d3bde..c19b5de6 100644 --- a/examples/seeking/spider_seek.c +++ b/examples/seeking/spider_seek.c @@ -136,7 +136,7 @@ query_rates (void) } G_GNUC_UNUSED static void -query_durations () +query_durations (void) { GList *walk = seekable_elements; @@ -165,7 +165,7 @@ query_durations () } G_GNUC_UNUSED static void -query_positions () +query_positions (void) { GList *walk = seekable_elements; @@ -345,11 +345,11 @@ main (int argc, char **argv) gtk_scale_set_digits (GTK_SCALE (hscale), 2); gtk_range_set_update_policy (GTK_RANGE (hscale), GTK_UPDATE_CONTINUOUS); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "button_press_event", G_CALLBACK (start_seek), pipeline); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "button_release_event", G_CALLBACK (stop_seek), pipeline); - gtk_signal_connect (GTK_OBJECT (hscale), + g_signal_connect (hscale, "format_value", G_CALLBACK (format_value), pipeline); /* do the packing stuff ... */ diff --git a/gst-libs/gst/idct/idct.c b/gst-libs/gst/idct/idct.c index ea24d44e..16f971bb 100644 --- a/gst-libs/gst/idct/idct.c +++ b/gst-libs/gst/idct/idct.c @@ -67,7 +67,7 @@ static void gst_idct_int_sparse_idct (short *data) { short val; - gint32 v, *dp = (guint32 *) data; + gint32 v, *dp = (gint32 *) data; v = *data; diff --git a/gst-libs/gst/media-info/media-info.c b/gst-libs/gst/media-info/media-info.c index 16a66250..f9297ae5 100644 --- a/gst-libs/gst/media-info/media-info.c +++ b/gst-libs/gst/media-info/media-info.c @@ -410,7 +410,7 @@ gst_media_info_read (GstMediaInfo * info, const char *location, guint16 flags, gst_media_info_read_with_idler (info, location, flags, error); if (*error) - return FALSE; + return NULL; while (gst_media_info_read_idler (info, &stream, error) && stream == NULL) /* keep looping */ ; if (*error) diff --git a/gst-libs/gst/xwindowlistener/xwindowlistener.c b/gst-libs/gst/xwindowlistener/xwindowlistener.c index ebbc9ac6..e3721d7c 100644 --- a/gst-libs/gst/xwindowlistener/xwindowlistener.c +++ b/gst-libs/gst/xwindowlistener/xwindowlistener.c @@ -196,7 +196,7 @@ gst_xwin_refresh (gpointer data) xswa.save_under = False; tmp = XCreateWindow (xwin->main_display, win, 0, 0, attr.width, attr.height, 0, - CopyFromParent, InputOutput, CopyFromParent, + CopyFromParent, InputOutput, (Visual *) CopyFromParent, (CWSaveUnder | CWBackingStore | CWOverrideRedirect), &xswa); XMapWindow (xwin->main_display, tmp); XUnmapWindow (xwin->main_display, tmp); diff --git a/gst/apetag/apedemux.c b/gst/apetag/apedemux.c index 8f4bca31..f6463afc 100644 --- a/gst/apetag/apedemux.c +++ b/gst/apetag/apedemux.c @@ -457,8 +457,8 @@ gst_ape_demux_parse_tags (GstApeDemux * ape, guint8 * data, gint size) break; /* read */ - tag = g_strndup (&data[8], n - 9); - val = g_strndup (&data[n], len); + tag = g_strndup ((char *) &data[8], n - 9); + val = g_strndup ((char *) &data[n], len); if (!strcasecmp (tag, "title")) { type = GST_TAG_TITLE; } else if (!strcasecmp (tag, "artist")) { diff --git a/gst/colorspace/yuv2rgb.c b/gst/colorspace/yuv2rgb.c index 290f07bc..4f9ba3ca 100644 --- a/gst/colorspace/yuv2rgb.c +++ b/gst/colorspace/yuv2rgb.c @@ -297,8 +297,7 @@ gst_colorspace_YV12_to_bgr16_mmx (GstColorspace * space, unsigned char *src, */ static int -number_of_bits_set (a) - unsigned long a; +number_of_bits_set (unsigned long a) { if (!a) return 0; @@ -312,8 +311,7 @@ number_of_bits_set (a) * Low performance, do not call often. */ static int -free_bits_at_top (a) - unsigned long a; +free_bits_at_top (unsigned long a) { /* assume char is 8 bits */ if (!a) @@ -329,8 +327,7 @@ free_bits_at_top (a) * Low performance, do not call often. */ static int -free_bits_at_bottom (a) - unsigned long a; +free_bits_at_bottom (unsigned long a) { /* assume char is 8 bits */ if (!a) diff --git a/gst/festival/gstfestival.c b/gst/festival/gstfestival.c index 0aefe233..4d0a3156 100644 --- a/gst/festival/gstfestival.c +++ b/gst/festival/gstfestival.c @@ -205,7 +205,7 @@ gst_festival_chain (GstPad * pad, GstData * _data) gchar *wavefile; int filesize; FILE *fd; - char *p; + guchar *p; char ack[4]; int n; GstFestival *festival; @@ -255,7 +255,7 @@ gst_festival_chain (GstPad * pad, GstData * _data) if (wavefile) { outbuf = gst_buffer_new (); - GST_BUFFER_DATA (outbuf) = wavefile; + GST_BUFFER_DATA (outbuf) = (guchar *) wavefile; GST_BUFFER_SIZE (outbuf) = filesize; gst_pad_push (festival->srcpad, GST_DATA (outbuf)); diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index 68f44559..07cce521 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -167,7 +167,8 @@ gst_flxdec_init (GstFlxDec * flxdec) } static void -flx_decode_chunks (GstFlxDec * flxdec, gulong count, gchar * data, gchar * dest) +flx_decode_chunks (GstFlxDec * flxdec, gulong count, guchar * data, + guchar * dest) { FlxFrameChunk *hdr; diff --git a/gst/games/gstvideoimage.c b/gst/games/gstvideoimage.c index c7905a14..ee8e150f 100644 --- a/gst/games/gstvideoimage.c +++ b/gst/games/gstvideoimage.c @@ -379,9 +379,9 @@ gst_video_image_copy_area (GstVideoImage * dest, gint xdest, gint ydest, #define ROUND_UP_8(x) (((x)+7)&~7) static void -paint_setup_I420 (GstVideoImage * p, char *dest) +paint_setup_I420 (GstVideoImage * p, guint8 * dest) { - p->yp = dest; + p->yp = (guint8 *) dest; p->ystride = ROUND_UP_4 (p->width); p->up = p->yp + p->ystride * ROUND_UP_2 (p->height); p->ustride = ROUND_UP_8 (p->width) / 2; @@ -421,7 +421,7 @@ copy_hline_I420 (GstVideoImage * dest, int xdest, int ydest, } static void -paint_setup_YV12 (GstVideoImage * p, char *dest) +paint_setup_YV12 (GstVideoImage * p, guint8 * dest) { p->yp = dest; p->ystride = ROUND_UP_4 (p->width); @@ -433,7 +433,7 @@ paint_setup_YV12 (GstVideoImage * p, char *dest) } static void -paint_setup_YUY2 (GstVideoImage * p, char *dest) +paint_setup_YUY2 (GstVideoImage * p, guint8 * dest) { p->yp = dest; p->up = dest + 1; @@ -443,7 +443,7 @@ paint_setup_YUY2 (GstVideoImage * p, char *dest) } static void -paint_setup_UYVY (GstVideoImage * p, char *dest) +paint_setup_UYVY (GstVideoImage * p, guint8 * dest) { p->yp = dest + 1; p->up = dest; @@ -453,7 +453,7 @@ paint_setup_UYVY (GstVideoImage * p, char *dest) } static void -paint_setup_YVYU (GstVideoImage * p, char *dest) +paint_setup_YVYU (GstVideoImage * p, guint8 * dest) { p->yp = dest; p->up = dest + 3; @@ -503,7 +503,7 @@ copy_hline_YUY2 (GstVideoImage * dest, int xdest, int ydest, } static void -paint_setup_IYU2 (GstVideoImage * p, char *dest) +paint_setup_IYU2 (GstVideoImage * p, guint8 * dest) { /* untested */ p->yp = dest + 1; @@ -540,7 +540,7 @@ copy_hline_IYU2 (GstVideoImage * dest, int xdest, int ydest, } static void -paint_setup_Y41B (GstVideoImage * p, char *dest) +paint_setup_Y41B (GstVideoImage * p, guint8 * dest) { p->yp = dest; p->ystride = ROUND_UP_4 (p->width); @@ -582,7 +582,7 @@ copy_hline_Y41B (GstVideoImage * dest, int xdest, int ydest, } static void -paint_setup_Y42B (GstVideoImage * p, char *dest) +paint_setup_Y42B (GstVideoImage * p, guint8 * dest) { p->yp = dest; p->ystride = ROUND_UP_4 (p->width); @@ -624,7 +624,7 @@ copy_hline_Y42B (GstVideoImage * dest, int xdest, int ydest, } static void -paint_setup_Y800 (GstVideoImage * p, char *dest) +paint_setup_Y800 (GstVideoImage * p, guint8 * dest) { /* untested */ p->yp = dest; @@ -652,7 +652,7 @@ copy_hline_Y800 (GstVideoImage * dest, int xdest, int ydest, } static void -paint_setup_YVU9 (GstVideoImage * p, char *dest) +paint_setup_YVU9 (GstVideoImage * p, guint8 * dest) { int h = ROUND_UP_4 (p->height); @@ -666,7 +666,7 @@ paint_setup_YVU9 (GstVideoImage * p, char *dest) } static void -paint_setup_YUV9 (GstVideoImage * p, char *dest) +paint_setup_YUV9 (GstVideoImage * p, guint8 * dest) { /* untested */ int h = ROUND_UP_4 (p->height); @@ -711,7 +711,7 @@ copy_hline_YUV9 (GstVideoImage * dest, int xdest, int ydest, } static void -paint_setup_xRGB8888 (GstVideoImage * p, char *dest) +paint_setup_xRGB8888 (GstVideoImage * p, guint8 * dest) { p->yp = dest + 1; p->up = dest + 2; @@ -721,7 +721,7 @@ paint_setup_xRGB8888 (GstVideoImage * p, char *dest) } static void -paint_setup_xBGR8888 (GstVideoImage * p, char *dest) +paint_setup_xBGR8888 (GstVideoImage * p, guint8 * dest) { p->yp = dest + 3; p->up = dest + 2; @@ -731,7 +731,7 @@ paint_setup_xBGR8888 (GstVideoImage * p, char *dest) } static void -paint_setup_RGBx8888 (GstVideoImage * p, char *dest) +paint_setup_RGBx8888 (GstVideoImage * p, guint8 * dest) { p->yp = dest + 0; p->up = dest + 1; @@ -741,7 +741,7 @@ paint_setup_RGBx8888 (GstVideoImage * p, char *dest) } static void -paint_setup_BGRx8888 (GstVideoImage * p, char *dest) +paint_setup_BGRx8888 (GstVideoImage * p, guint8 * dest) { p->yp = dest + 2; p->up = dest + 1; @@ -751,7 +751,7 @@ paint_setup_BGRx8888 (GstVideoImage * p, char *dest) } static void -paint_setup_RGB888 (GstVideoImage * p, char *dest) +paint_setup_RGB888 (GstVideoImage * p, guint8 * dest) { p->yp = dest + 0; p->up = dest + 1; @@ -761,7 +761,7 @@ paint_setup_RGB888 (GstVideoImage * p, char *dest) } static void -paint_setup_BGR888 (GstVideoImage * p, char *dest) +paint_setup_BGR888 (GstVideoImage * p, guint8 * dest) { p->yp = dest + 2; p->up = dest + 1; @@ -821,7 +821,7 @@ copy_hline_str3 (GstVideoImage * dest, int xdest, int ydest, } static void -paint_setup_RGB565 (GstVideoImage * p, char *dest) +paint_setup_RGB565 (GstVideoImage * p, guint8 * dest) { p->yp = dest; p->ystride = ROUND_UP_4 (p->width * 2); @@ -859,7 +859,7 @@ copy_hline_str2 (GstVideoImage * dest, int xdest, int ydest, } static void -paint_setup_xRGB1555 (GstVideoImage * p, char *dest) +paint_setup_xRGB1555 (GstVideoImage * p, guint8 * dest) { p->yp = dest; p->ystride = ROUND_UP_4 (p->width * 2); diff --git a/gst/games/gstvideoimage.h b/gst/games/gstvideoimage.h index 7392d0d1..2fa91d85 100644 --- a/gst/games/gstvideoimage.h +++ b/gst/games/gstvideoimage.h @@ -67,7 +67,7 @@ struct _GstVideoFormat char * fourcc; char * name; int bitspp; - void (* paint_setup) (GstVideoImage * p, char *dest); + void (* paint_setup) (GstVideoImage * p, guint8 *dest); void (* paint_hline) (GstVideoImage * p, int x, int y, int w, const GstVideoColor *c); void (* copy_hline) (GstVideoImage * dest, int destx, int desty, GstVideoImage * src, int srcx, int srcy, int w); diff --git a/gst/librfb/rfbdecoder.c b/gst/librfb/rfbdecoder.c index b30dc34d..45d93782 100644 --- a/gst/librfb/rfbdecoder.c +++ b/gst/librfb/rfbdecoder.c @@ -157,7 +157,7 @@ rfb_decoder_state_wait_for_protocol_version (RfbDecoder * decoder) GST_DEBUG ("\"%.11s\"", buffer->data); rfb_buffer_free (buffer); - rfb_decoder_send (decoder, "RFB 003.003\n", 12); + rfb_decoder_send (decoder, (guchar *) "RFB 003.003\n", 12); decoder->state = rfb_decoder_state_wait_for_security; diff --git a/gst/mpeg1sys/gstmpeg1systemencode.c b/gst/mpeg1sys/gstmpeg1systemencode.c index 35c3e0b6..d2839db1 100644 --- a/gst/mpeg1sys/gstmpeg1systemencode.c +++ b/gst/mpeg1sys/gstmpeg1systemencode.c @@ -385,7 +385,7 @@ static void gst_system_encode_multiplex (GstMPEG1SystemEncode * system_encode) { GList *streams; - Mpeg1MuxBuffer *mb = (Mpeg1MuxBuffer *) streams->data; + Mpeg1MuxBuffer *mb; guchar timestamps; guchar buffer_scale; GstBuffer *outbuf; diff --git a/gst/mpeg2sub/gstmpeg2subt.c b/gst/mpeg2sub/gstmpeg2subt.c index 23a2456e..4f6347e5 100644 --- a/gst/mpeg2sub/gstmpeg2subt.c +++ b/gst/mpeg2sub/gstmpeg2subt.c @@ -704,6 +704,7 @@ gst_mpeg2subt_merge_title (GstMpeg2Subt * mpeg2subt, GstBuffer * buf) " using %s colour table", GST_BUFFER_TIMESTAMP (buf), mpeg2subt->forced_display ? "menu" : "subtitle"); + state.next = 0; state.id = 0; state.aligned = 1; state.offset[0] = mpeg2subt->offset[0]; @@ -908,7 +909,7 @@ gst_mpeg2subt_handle_dvd_event (GstMpeg2Subt * mpeg2subt, GstEvent * event, gst_update_still_frame (mpeg2subt); } else if (from_sub_pad && !strcmp (event_type, "dvd-spu-clut-change")) { /* Take a copy of the colour table */ - guchar name[16]; + gchar name[16]; int i; gint value; diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c index 8e77acac..eba2044b 100644 --- a/gst/mpegaudioparse/gstmpegaudioparse.c +++ b/gst/mpegaudioparse/gstmpegaudioparse.c @@ -387,7 +387,7 @@ gst_mp3parse_chain (GstPad * pad, GstData * _data) bpf); break; } else { - guint bitrate, layer, rate, channels; + guint bitrate = 0, layer = 0, rate = 0, channels = 0; if (!mp3_type_frame_length_from_header (header, &layer, &channels, &bitrate, &rate)) { diff --git a/gst/rtjpeg/RTjpeg.c b/gst/rtjpeg/RTjpeg.c index eaf8a5ab..632a9240 100644 --- a/gst/rtjpeg/RTjpeg.c +++ b/gst/rtjpeg/RTjpeg.c @@ -2544,9 +2544,9 @@ int RTjpeg_compressYUV420 (__s8 * sp, unsigned char *bp) { __s8 *sb; - register __s8 *bp1 = bp + (RTjpeg_width << 3); - register __s8 *bp2 = bp + RTjpeg_Ysize; - register __s8 *bp3 = bp2 + (RTjpeg_Csize >> 1); + register __u8 *bp1 = bp + (RTjpeg_width << 3); + register __u8 *bp2 = bp + RTjpeg_Ysize; + register __u8 *bp3 = bp2 + (RTjpeg_Csize >> 1); register int i, j, k; #ifdef HAVE_LIBMMX @@ -2597,8 +2597,8 @@ int RTjpeg_compressYUV422 (__s8 * sp, unsigned char *bp) { __s8 *sb; - register __s8 *bp2 = bp + RTjpeg_Ysize; - register __s8 *bp3 = bp2 + RTjpeg_Csize; + register __u8 *bp2 = bp + RTjpeg_Ysize; + register __u8 *bp3 = bp2 + RTjpeg_Csize; register int i, j, k; #ifdef HAVE_LIBMMX @@ -2666,8 +2666,8 @@ RTjpeg_compress8 (__s8 * sp, unsigned char *bp) void RTjpeg_decompressYUV422 (__s8 * sp, __u8 * bp) { - register __s8 *bp2 = bp + RTjpeg_Ysize; - register __s8 *bp3 = bp2 + (RTjpeg_Csize); + register __u8 *bp2 = bp + RTjpeg_Ysize; + register __u8 *bp3 = bp2 + (RTjpeg_Csize); int i, j, k; #ifdef HAVE_LIBMMX @@ -2714,9 +2714,9 @@ RTjpeg_decompressYUV422 (__s8 * sp, __u8 * bp) void RTjpeg_decompressYUV420 (__s8 * sp, __u8 * bp) { - register __s8 *bp1 = bp + (RTjpeg_width << 3); - register __s8 *bp2 = bp + RTjpeg_Ysize; - register __s8 *bp3 = bp2 + (RTjpeg_Csize >> 1); + register __u8 *bp1 = bp + (RTjpeg_width << 3); + register __u8 *bp2 = bp + RTjpeg_Ysize; + register __u8 *bp3 = bp2 + (RTjpeg_Csize >> 1); int i, j, k; #ifdef HAVE_LIBMMX @@ -2896,8 +2896,8 @@ RTjpeg_mcompress (__s8 * sp, unsigned char *bp, __u16 lmask, __u16 cmask) { __s8 *sb; __s16 *block; - register __s8 *bp2; - register __s8 *bp3; + register __u8 *bp2; + register __u8 *bp3; register int i, j, k; #ifdef HAVE_LIBMMX diff --git a/gst/vbidec/vbidata.c b/gst/vbidec/vbidata.c index 76f43110..87b90ea4 100644 --- a/gst/vbidec/vbidata.c +++ b/gst/vbidec/vbidata.c @@ -203,7 +203,7 @@ const char *canf_tv[] = { "Exempt", "G", "8 ans +", "13 ans +", "Reserved" }; -const char *months[] = { 0, "Jan", "Feb", "Mar", "Apr", "May", +const char *months[] = { NULL, "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; @@ -1000,7 +1000,7 @@ vbidata_new_file (const char *filename, vbiscreen_t * vs, vbidata_t *vbi = (vbidata_t *) malloc (sizeof (vbidata_t)); if (!vbi) { - return 0; + return NULL; } vbi->fd = open (filename, O_RDONLY); @@ -1008,7 +1008,7 @@ vbidata_new_file (const char *filename, vbiscreen_t * vs, fprintf (stderr, "vbidata: Can't open %s: %s\n", filename, strerror (errno)); free (vbi); - return 0; + return NULL; } vbi->vs = vs; @@ -1026,7 +1026,7 @@ vbidata_new_line (vbiscreen_t * vs, int verbose) vbidata_t *vbi = (vbidata_t *) malloc (sizeof (vbidata_t)); if (!vbi) { - return 0; + return NULL; } vbi->vs = vs; diff --git a/sys/glsink/glimagesink.c b/sys/glsink/glimagesink.c index e94bf1ae..73ed7aa6 100644 --- a/sys/glsink/glimagesink.c +++ b/sys/glsink/glimagesink.c @@ -701,7 +701,7 @@ gst_glimagesink_xcontext_get (GstGLImageSink * glimagesink) /* create a GLX context */ xcontext->glx = - glXCreateContext (xcontext->disp, xcontext->visualinfo, 0, GL_TRUE); + glXCreateContext (xcontext->disp, xcontext->visualinfo, NULL, GL_TRUE); if (glXIsDirect (xcontext->disp, xcontext->glx)) printf ("Congrats, you have Direct Rendering!\n"); -- cgit v1.2.1