diff options
author | Andre Pang <athp@users.sourceforge.net> | 2004-12-12 06:55:58 +0000 |
---|---|---|
committer | Andre Pang <athp@users.sourceforge.net> | 2004-12-12 06:55:58 +0000 |
commit | 1de00c1f9d0f1eba90be53b8dd9635b79b68dc2a (patch) | |
tree | 057da9b98c78a90e2a4446ab56e413c1479ae5ac | |
parent | f5e91a956b0df782bbdfb23beb319846ca2ebe4f (diff) | |
download | xine-lib-1de00c1f9d0f1eba90be53b8dd9635b79b68dc2a.tar.gz xine-lib-1de00c1f9d0f1eba90be53b8dd9635b79b68dc2a.tar.bz2 |
Code cleanups and elimination of some compiler warnings; patch courtesy of AL13N
CVS patchset: 7230
CVS date: 2004/12/12 06:55:58
-rw-r--r-- | src/demuxers/demux_ogg.c | 7 | ||||
-rw-r--r-- | src/liba52/crc.c | 2 | ||||
-rw-r--r-- | src/libspeex/xine_decoder.c | 6 | ||||
-rw-r--r-- | src/libw32dll/wine/debugtools.h | 10 | ||||
-rw-r--r-- | src/libw32dll/wine/module.c | 12 | ||||
-rw-r--r-- | src/libxineadec/nosefart/nes_apu.c | 9 | ||||
-rw-r--r-- | src/video_out/vidix/drivers/cyberblade_vid.c | 6 | ||||
-rw-r--r-- | src/video_out/vidix/drivers/mach64_vid.c | 4 | ||||
-rw-r--r-- | src/video_out/vidix/drivers/sis_bridge.c | 15 | ||||
-rw-r--r-- | src/video_out/vidix/drivers/sis_vid.c | 6 |
10 files changed, 58 insertions, 19 deletions
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index 0d922c2af..cc3dd0706 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -19,7 +19,7 @@ */ /* - * $Id: demux_ogg.c,v 1.156 2004/12/03 04:11:42 conrad Exp $ + * $Id: demux_ogg.c,v 1.157 2004/12/12 06:55:58 athp Exp $ * * demultiplexer for ogg streams * @@ -717,7 +717,8 @@ static void send_ogg_buf (demux_ogg_t *this, buf->size = 12 + op->bytes + 1; - lprintf ("CMML stream %d: PTS %d: %s\n", stream_num, buf->pts, str); + lprintf ("CMML stream %d (bytes=%d): PTS %d: %s\n", + stream_num, op->bytes, buf->pts, str); this->video_fifo->put (this->video_fifo, buf); @@ -818,7 +819,7 @@ static void decode_speex_header (demux_ogg_t *this, const int stream_num, ogg_pa if (header) { int bitrate; - mode = speex_mode_list[header->mode]; + mode = (SpeexMode *) speex_mode_list[header->mode]; st = speex_decoder_init (mode); diff --git a/src/liba52/crc.c b/src/liba52/crc.c index d19a4a2e1..2cd92e116 100644 --- a/src/liba52/crc.c +++ b/src/liba52/crc.c @@ -25,6 +25,8 @@ #include <stdio.h> #include <inttypes.h> +uint16_t crc16_block(uint8_t *,uint32_t); + static const uint16_t crc_lut[256] = { 0x0000,0x8005,0x800f,0x000a,0x801b,0x001e,0x0014,0x8011, diff --git a/src/libspeex/xine_decoder.c b/src/libspeex/xine_decoder.c index ba843d63f..58034b2d3 100644 --- a/src/libspeex/xine_decoder.c +++ b/src/libspeex/xine_decoder.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: xine_decoder.c,v 1.13 2004/11/12 06:32:54 athp Exp $ + * $Id: xine_decoder.c,v 1.14 2004/12/12 06:55:58 athp Exp $ * * (ogg/)speex audio decoder plugin (libspeex wrapper) for xine */ @@ -327,7 +327,7 @@ static void speex_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { int bitrate; ogg_int16_t * ptr = audio_buffer->mem; - ret = speex_decode (this->st, &this->bits, this->output); + ret = speex_decode (this->st, &this->bits, (short *) this->output); if (ret==-1) break; @@ -341,7 +341,7 @@ static void speex_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { } if (this->channels == 2) { - speex_decode_stereo (this->output, this->frame_size, &this->stereo); + speex_decode_stereo ( (short *) this->output, this->frame_size, &this->stereo); } speex_decoder_ctl (this->st, SPEEX_GET_BITRATE, &bitrate); diff --git a/src/libw32dll/wine/debugtools.h b/src/libw32dll/wine/debugtools.h index ef86580af..038c05309 100644 --- a/src/libw32dll/wine/debugtools.h +++ b/src/libw32dll/wine/debugtools.h @@ -12,13 +12,21 @@ struct _GUID; +#ifndef TRACE #ifdef LOG # define TRACE __vprintf -# define dbg_printf __vprintf #else # define TRACE(...) +#endif +#endif + +#ifndef dbg_printf +#ifdef LOG +# define dbg_printf __vprintf +#else # define dbg_printf(...) #endif +#endif /* Internal definitions (do not use these directly) */ diff --git a/src/libw32dll/wine/module.c b/src/libw32dll/wine/module.c index a1d281cde..2c7ddc454 100644 --- a/src/libw32dll/wine/module.c +++ b/src/libw32dll/wine/module.c @@ -144,8 +144,12 @@ static WIN_BOOL MODULE_InitDll( WINE_MODREF *wm, DWORD type, LPVOID lpReserved ) return TRUE; +#ifdef LOG TRACE("(%s,%s,%p) - CALL\n", wm->modname, typeName[type], lpReserved ); - +#else + TRACE("(%s,%p) - CALL\n", wm->modname, lpReserved ); +#endif + /* Call the initialization routine */ switch ( wm->type ) { @@ -166,8 +170,12 @@ static WIN_BOOL MODULE_InitDll( WINE_MODREF *wm, DWORD type, LPVOID lpReserved ) /* The state of the module list may have changed due to the call to PE_InitDLL. We cannot assume that this module has not been deleted. */ +#ifdef LOG TRACE("(%p,%s,%p) - RETURN %d\n", wm, typeName[type], lpReserved, retv ); - +#else + TRACE("(%p,%p) - RETURN %d\n", wm, lpReserved, retv ); +#endif + return retv; } diff --git a/src/libxineadec/nosefart/nes_apu.c b/src/libxineadec/nosefart/nes_apu.c index 162bcebbd..525d103b1 100644 --- a/src/libxineadec/nosefart/nes_apu.c +++ b/src/libxineadec/nosefart/nes_apu.c @@ -20,7 +20,7 @@ ** nes_apu.c ** ** NES APU emulation -** $Id: nes_apu.c,v 1.2 2003/08/25 21:51:43 f1rmb Exp $ +** $Id: nes_apu.c,v 1.3 2004/12/12 06:55:59 athp Exp $ */ #include <string.h> @@ -102,12 +102,12 @@ const int dmc_clocks[16] = /* ratios of pos/neg pulse for rectangle waves */ static const int duty_lut[4] = { 2, 4, 8, 12 }; - +#if 0 /* unused */ static void apu_setcontext(apu_t *src_apu) { apu = src_apu; } - +#endif /* ** Simple queue routines @@ -1154,6 +1154,9 @@ int32 apu_getcyclerate(void) /* ** $Log: nes_apu.c,v $ +** Revision 1.3 2004/12/12 06:55:59 athp +** Code cleanups and elimination of some compiler warnings; patch courtesy of AL13N +** ** Revision 1.2 2003/08/25 21:51:43 f1rmb ** Reduce GCC verbosity (various prototype declaration fixes). ffmpeg, wine and fft*post are untouched (fft: for now). ** diff --git a/src/video_out/vidix/drivers/cyberblade_vid.c b/src/video_out/vidix/drivers/cyberblade_vid.c index b6d9a4ad8..0c2c6ef37 100644 --- a/src/video_out/vidix/drivers/cyberblade_vid.c +++ b/src/video_out/vidix/drivers/cyberblade_vid.c @@ -60,6 +60,7 @@ FILE *logfile=0; /* Helper functions for reading registers. */ +#if 0 /* unused */ static int CRINW(int reg) { int result; @@ -67,6 +68,7 @@ static int CRINW(int reg) result|=CRINB(reg+1)<<8; return(result); } +#endif static void CROUTW(int reg,int val) { @@ -74,6 +76,7 @@ static void CROUTW(int reg,int val) CROUTB(reg+1,(val>>8)&255); } +#if 0 /* unused */ static int SRINW(int reg) { int result; @@ -81,6 +84,7 @@ static int SRINW(int reg) result|=SRINB(reg+1)<<8; return(result); } +#endif static void SROUTW(int reg,int val) { @@ -88,6 +92,7 @@ static void SROUTW(int reg,int val) SROUTB(reg+1,(val>>8)&255); } +#if 0 /* unused */ static void DumpRegisters(void) { #ifdef DEBUG_LOGFILE @@ -109,6 +114,7 @@ static void DumpRegisters(void) } #endif } +#endif /* --- */ diff --git a/src/video_out/vidix/drivers/mach64_vid.c b/src/video_out/vidix/drivers/mach64_vid.c index 0f965234f..df1571bad 100644 --- a/src/video_out/vidix/drivers/mach64_vid.c +++ b/src/video_out/vidix/drivers/mach64_vid.c @@ -550,8 +550,11 @@ static void restore_regs( void ) } static int forced_irq=INT_MAX; + +#ifdef MACH64_ENABLE_BM static int can_use_irq=0; static int irq_installed=0; + static void init_irq(void) { irq_installed=1; @@ -568,6 +571,7 @@ static void init_irq(void) ,strerror(errno) ,pci_info.irq,pci_info.ipin,pci_info.gnt,pci_info.lat); } +#endif int VIDIX_NAME(vixInit)(const char *args) { diff --git a/src/video_out/vidix/drivers/sis_bridge.c b/src/video_out/vidix/drivers/sis_bridge.c index 5e8701a4a..f6916ae87 100644 --- a/src/video_out/vidix/drivers/sis_bridge.c +++ b/src/video_out/vidix/drivers/sis_bridge.c @@ -31,6 +31,7 @@ #include "sis_regs.h" #include "sis_defs.h" +void sis_init_video_bridge(void); static void sis_ddc2_delay(unsigned short delaytime) { @@ -71,7 +72,9 @@ static void sis_sense_30x() unsigned char testvga2_tempbl, testvga2_tempbh; unsigned char testvga2_tempcl, testvga2_tempch; int myflag, result = 0, i, j, haveresult; +#if 0 unsigned short temp; +#endif inSISIDXREG(SISPART4, 0x0d, backupP4_0d); outSISIDXREG(SISPART4, 0x0d, (backupP4_0d | 0x04)); @@ -394,10 +397,14 @@ static void sis_detect_crt1() } } - +#if 0 /* not used yet */ static void sis_detect_lcd() { - unsigned char CR32, CR36, CR37; + unsigned char CR32; +#if 0 + /* not supported yet? */ + unsigned char CR36, CR37; +#endif if (!(sis_vbflags & VB_VIDEOBRIDGE)) { return; @@ -412,7 +419,7 @@ static void sis_detect_lcd() /* Get other misc info about LCD - not supported */ } - +#endif static void sis_detect_tv() { @@ -715,7 +722,7 @@ void sis_init_video_bridge() sis_detect_video_bridge(); sis_detect_crt1(); - //sis_detect_lcd(); + //sis_detect_lcd(); /* not fully ready probably */ sis_detect_tv(); sis_detect_crt2(); diff --git a/src/video_out/vidix/drivers/sis_vid.c b/src/video_out/vidix/drivers/sis_vid.c index ba40f6b41..c3ef2bdcf 100644 --- a/src/video_out/vidix/drivers/sis_vid.c +++ b/src/video_out/vidix/drivers/sis_vid.c @@ -170,13 +170,13 @@ extern void sis_init_video_bridge(); static void set_overlay(SISOverlayPtr pOverlay, int index); -static void close_overlay(); +static void close_overlay(void); static void calc_scale_factor(SISOverlayPtr pOverlay, int index, int iscrt2); static void set_line_buf_size(SISOverlayPtr pOverlay); static void merge_line_buf(int enable); static void set_format(SISOverlayPtr pOverlay); -static void set_colorkey(); +static void set_colorkey(void); static void set_brightness(uint8_t brightness); static void set_contrast(uint8_t contrast); @@ -367,7 +367,7 @@ int vixInit(const char *args) inSISIDXREG(SISCR, 0x07, cr_data2); sis_screen_height = ((cr_data & 0xff) | ((uint16_t) (cr_data2 & 0x02) << 7) | - ((uint16_t) (cr_data2 & 0x40) << 3) | ((uint16_t) (sr_data & 0x02) + ((uint16_t) (cr_data2 & 0x40) << 3) | ((uint16_t) (cr_data & 0x02) << 9)) + 1; inSISIDXREG(SISSR, 0x0b, sr_data); |