From f945ec50a244d3a7ecee47e6535aeb02afb17930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Jun 2006 01:07:58 +0000 Subject: Fix generic warnings. CVS patchset: 8064 CVS date: 2006/06/20 01:07:58 --- src/input/libreal/real.c | 26 ++++++++++---------------- src/input/libreal/rmff.c | 8 ++++---- src/input/libreal/sdpplin.c | 9 +++++---- src/input/librtsp/rtsp.c | 5 +++-- src/input/vcd/xineplug_inp_vcd.c | 18 ++++++++++++------ src/video_out/video_out_opengl.c | 4 ++-- src/video_out/video_out_xshm.c | 10 +++++----- src/video_out/yuv2rgb.c | 4 ++-- 8 files changed, 43 insertions(+), 41 deletions(-) diff --git a/src/input/libreal/real.c b/src/input/libreal/real.c index 6ce9e132d..f95b754a7 100644 --- a/src/input/libreal/real.c +++ b/src/input/libreal/real.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: real.c,v 1.22 2006/03/18 09:35:03 tmattern Exp $ + * $Id: real.c,v 1.23 2006/06/20 01:07:58 dgp85 Exp $ * * special functions for real streams. * adopted from joschkas real tools. @@ -40,7 +40,8 @@ #include "xineutils.h" #include "bswap.h" -const unsigned char xor_table[] = { +#define XOR_TABLE_LEN 37 +static const unsigned char xor_table[] = { 0x05, 0x18, 0x74, 0xd0, 0x0d, 0x09, 0x02, 0x53, 0xc0, 0x01, 0x05, 0x05, 0x67, 0x03, 0x19, 0x70, 0x08, 0x27, 0x66, 0x10, 0x10, 0x72, 0x08, 0x09, @@ -215,9 +216,9 @@ static void hash(char *field, char *param) { LE_32C(field+12, d); } -static void call_hash (char *key, char *challenge, int len) { +static void call_hash (char *key, char *challenge, unsigned int len) { - uint8_t *ptr1, *ptr2; + char *ptr1, *ptr2; uint32_t a, b, c, d, tmp; ptr1=(key+16); @@ -262,7 +263,7 @@ static void calc_response (char *result, char *field) { char buf1[128]; char buf2[128]; - int i; + unsigned int i; memset (buf1, 0, 64); *buf1 = 128; @@ -318,7 +319,7 @@ static void calc_response_string (char *result, char *challenge) { void real_calc_response_and_checksum (char *response, char *chksum, char *challenge) { - int ch_len, table_len, resp_len; + int ch_len, resp_len; int i; char *ptr; char buf[128]; @@ -351,16 +352,9 @@ void real_calc_response_and_checksum (char *response, char *chksum, char *challe memcpy(ptr, challenge, ch_len); } - if (xor_table != NULL) - { - table_len = strlen(xor_table); - - if (table_len > 56) table_len=56; - - /* xor challenge bytewise with xor_table */ - for (i=0; ifileheader=NULL; header->prop=NULL; @@ -722,8 +722,8 @@ void rmff_print_header(rmff_header_t *h) { void rmff_fix_header(rmff_header_t *h) { - int num_headers=0; - int header_size=0; + unsigned int num_headers=0; + unsigned int header_size=0; rmff_mdpr_t **streams; int num_streams=0; diff --git a/src/input/libreal/sdpplin.c b/src/input/libreal/sdpplin.c index 91aa133fa..e77781253 100644 --- a/src/input/libreal/sdpplin.c +++ b/src/input/libreal/sdpplin.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: sdpplin.c,v 1.5 2004/04/23 21:59:04 miguelfreitas Exp $ + * $Id: sdpplin.c,v 1.6 2006/06/20 01:07:58 dgp85 Exp $ * * sdp/sdpplin parser. * @@ -41,7 +41,8 @@ static char *b64_decode(const char *in, char *out, int *size) { char dtable[256]; /* Encode / decode table */ - int i,j,k; + int i,k; + size_t j; for (i = 0; i < 255; i++) { dtable[i] = 0x80; @@ -101,12 +102,12 @@ static char *nl(char *data) { static int filter(const char *in, const char *filter, char **out) { int flen=strlen(filter); - int len; + size_t len; if (!in) return 0; - len = (strchr(in,'\n')) ? strchr(in,'\n')-in : strlen(in); + len = (strchr(in,'\n')) ? (size_t)(strchr(in,'\n')-in) : strlen(in); if (!strncmp(in,filter,flen)) { diff --git a/src/input/librtsp/rtsp.c b/src/input/librtsp/rtsp.c index 9c3dbb125..ffe181547 100644 --- a/src/input/librtsp/rtsp.c +++ b/src/input/librtsp/rtsp.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: rtsp.c,v 1.20 2006/03/18 09:42:43 tmattern Exp $ + * $Id: rtsp.c,v 1.21 2006/06/20 01:07:58 dgp85 Exp $ * * a minimalistic implementation of rtsp protocol, * *not* RFC 2326 compilant yet. @@ -442,7 +442,8 @@ rtsp_t *rtsp_connect(xine_stream_t *stream, const char *mrl, const char *user_ag rtsp_t *s = malloc(sizeof(rtsp_t)); char *mrl_ptr=strdup(mrl); char *slash, *colon; - int hostend, pathbegin, i; + int hostend, i; + size_t pathbegin; if (strncmp(mrl,"rtsp://",7)) { diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c index 22a9f5e17..3c83a8c3e 100644 --- a/src/input/vcd/xineplug_inp_vcd.c +++ b/src/input/vcd/xineplug_inp_vcd.c @@ -1,5 +1,5 @@ /* - $Id: xineplug_inp_vcd.c,v 1.48 2006/06/18 20:29:04 dgp85 Exp $ + $Id: xineplug_inp_vcd.c,v 1.49 2006/06/20 01:07:58 dgp85 Exp $ Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein @@ -167,8 +167,10 @@ vcd_input_plugin_t my_vcd; /* Prototype definitions */ static bool vcd_handle_events (void); static void vcd_close(vcd_input_class_t *class); +#if LIBVCD_VERSION_NUM >= 23 static void send_mouse_enter_leave_event(vcd_input_plugin_t *p_this, bool b_mouse_in); +#endif /* If class->vcd_device is NULL or the empty string, @@ -948,7 +950,7 @@ vcd_plugin_get_mrl (input_plugin_t *this_gen) { vcd_input_plugin_t *t = (vcd_input_plugin_t *) this_gen; vcdplayer_t *vcdplayer = &my_vcd.player; - unsigned int n; + int n; int size; /* need something to feed get_mrl_type_offset */ int offset; @@ -1172,7 +1174,9 @@ vcd_handle_events (void) xine_input_data_t *p_input = p_event->data; if (p_input->button == 1) { +#if LIBVCD_VERSION_NUM >= 23 int i_selection; +#endif dbg_print(INPUT_DBG_EVENT, "Button to x: %d, y: %d, scaled x: %d, scaled y %d\n", @@ -1281,11 +1285,11 @@ vcd_get_optional_data (input_plugin_t *this_gen, case INPUT_OPTIONAL_DATA_AUDIOLANG: { - int8_t channel; - channel = (int8_t) _x_get_audio_channel(my_vcd.stream); + uint8_t channel; + channel = _x_get_audio_channel(my_vcd.stream); dbg_print(INPUT_DBG_EXT, "AUDIO CHANNEL = %d\n", channel); - if (-1 == channel) { + if (channel == (uint8_t)-1) { sprintf(data, " %s", "auto"); } else { const vcdinfo_obj_t *p_vcdinfo= my_vcd.player.vcd; @@ -1349,7 +1353,7 @@ vcd_class_get_autoplay_list (input_class_t *this_gen, int *num_files) *num_files = 0; return NULL; } else { - unsigned int i; + int i; int size = 0; vcdinfo_item_enum_t itemtype = autoplay2itemtype[my_vcd.player.default_autoplay]; @@ -1539,6 +1543,7 @@ vcd_update_title_display(void) xine_event_send(my_vcd.stream, &uevent); } +#if LIBVCD_VERSION_NUM >= 23 static void send_mouse_enter_leave_event(vcd_input_plugin_t *p_this, bool b_mouse_in) { @@ -1566,6 +1571,7 @@ send_mouse_enter_leave_event(vcd_input_plugin_t *p_this, bool b_mouse_in) if (!b_mouse_in) p_this->i_mouse_button = -1; } +#endif /* Not much special initialization needed here. All of the initialization diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index 082febd75..1936c0455 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_opengl.c,v 1.57 2006/06/15 21:40:05 komadori Exp $ + * $Id: video_out_opengl.c,v 1.58 2006/06/20 01:07:58 dgp85 Exp $ * * video_out_opengl.c, OpenGL based interface for xine * @@ -945,7 +945,7 @@ static int render_setup_fp_yuv (opengl_driver_t *this) { ret = render_setup_tex2d (this); if (! this->has_fragprog) return 0; - if (this->fprog == -1) + if (this->fprog == (GLuint)-1) this->glGenProgramsARB (1, &this->fprog); this->glBindProgramARB (MYGL_FRAGMENT_PROGRAM_ARB, this->fprog); this->glProgramStringARB (MYGL_FRAGMENT_PROGRAM_ARB, diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index d28c2adc0..c2e6bd3bc 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xshm.c,v 1.144 2006/06/02 22:18:59 dsalt Exp $ + * $Id: video_out_xshm.c,v 1.145 2006/06/20 01:07:58 dgp85 Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -595,7 +595,7 @@ static void xshm_update_frame_format (vo_driver_t *this_gen, static void xshm_overlay_clut_yuv2rgb(xshm_driver_t *this, vo_overlay_t *overlay, xshm_frame_t *frame) { - int i; + size_t i; clut_t* clut = (clut_t*) overlay->color; if (!overlay->rgb_clut) { @@ -1021,10 +1021,10 @@ static int ImlibPaletteLUTGet(xshm_driver_t *this) { &bytes_after, &retval); if (retval != 0 && num_ret > 0 && format_ret > 0) { if (format_ret == 8) { - int j, i, num_colors; + unsigned int i; + unsigned long j; - num_colors = retval[0]; - j = 1 + num_colors*4; + j = 1 + retval[0]*4; this->yuv2rgb_cmap = malloc(sizeof(uint8_t) * 32 * 32 * 32); for (i = 0; i < 32 * 32 * 32 && j < num_ret; i++) this->yuv2rgb_cmap[i] = retval[1+4*retval[j++]+3]; diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c index a8aa2d1fc..5fc04f688 100644 --- a/src/video_out/yuv2rgb.c +++ b/src/video_out/yuv2rgb.c @@ -23,7 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: yuv2rgb.c,v 1.51 2004/04/11 12:25:35 komadori Exp $ + * $Id: yuv2rgb.c,v 1.52 2006/06/20 01:07:59 dgp85 Exp $ */ #include "config.h" @@ -1276,7 +1276,7 @@ static scale_line_func_t find_scale_line_func(int step) { { 1, 2, scale_line_1_2, "2*zoom" }, { 1, 1, scale_line_1_1, "non-scaled" }, }; - int i; + size_t i; #ifdef LOG /* to filter out multiple messages about the scale_line variant we're using */ static int reported_for_step; -- cgit v1.2.3