diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-05-04 22:12:55 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-05-06 18:33:16 +0300 |
commit | b68f9fef32971095836ea6bbeb2f12af417120d2 (patch) | |
tree | 46288d0356764318d595a946d22ca31eaf6b0101 /stream | |
parent | 40f6ab5064a628dc11b79b5e571dc9444efac093 (diff) | |
download | mpv-b68f9fef32971095836ea6bbeb2f12af417120d2.tar.bz2 mpv-b68f9fef32971095836ea6bbeb2f12af417120d2.tar.xz |
cleanup: shut up more warnings
Diffstat (limited to 'stream')
-rw-r--r-- | stream/asf_mmst_streaming.c | 6 | ||||
-rw-r--r-- | stream/dvb_tune.c | 2 | ||||
-rw-r--r-- | stream/freesdp/parser.c | 8 | ||||
-rw-r--r-- | stream/realrtsp/real.c | 3 | ||||
-rw-r--r-- | stream/stream.c | 2 | ||||
-rw-r--r-- | stream/stream_cdda.c | 6 | ||||
-rw-r--r-- | stream/tv.c | 6 |
7 files changed, 15 insertions, 18 deletions
diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c index 32bf325f25..3af97b148b 100644 --- a/stream/asf_mmst_streaming.c +++ b/stream/asf_mmst_streaming.c @@ -521,7 +521,7 @@ int asf_mmst_streaming_start(stream_t *stream) char data[BUF_SIZE]; uint8_t asf_header[HDR_BUF_SIZE]; int asf_header_len; - int len, i, packet_length; + int i, packet_length; char *path, *unescpath; URL_t *url1 = stream->streaming_ctrl->url; int s = stream->fd; @@ -574,7 +574,7 @@ int asf_mmst_streaming_start(stream_t *stream) // send_command(s, commandno ....) send_command (s, 1, 0, 0x0004000b, strlen(str)*2+2, data); - len = recv (s, data, BUF_SIZE, 0) ; + recv (s, data, BUF_SIZE, 0) ; /*This sends details of the local machine IP address to a Funnel system at the server. * Also, the TCP or UDP transport selection is sent. @@ -588,7 +588,7 @@ int asf_mmst_streaming_start(stream_t *stream) memset (data, 0, 8); send_command (s, 2, 0, 0, 24*2+10, data); - len = recv (s, data, BUF_SIZE, 0) ; + recv (s, data, BUF_SIZE, 0) ; /* This command sends file path (at server) and file name request to the server. * 0x5 */ diff --git a/stream/dvb_tune.c b/stream/dvb_tune.c index 56deadc034..8730c582a0 100644 --- a/stream/dvb_tune.c +++ b/stream/dvb_tune.c @@ -325,7 +325,7 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int fe_transmit_mode_t TransmissionMode, fe_guard_interval_t guardInterval, fe_bandwidth_t bandwidth, fe_code_rate_t LP_CodeRate, fe_hierarchy_t hier, int timeout) { - int res, hi_lo, dfd; + int res, hi_lo = 0, dfd; struct dvb_frontend_parameters feparams; struct dvb_frontend_info fe_info; diff --git a/stream/freesdp/parser.c b/stream/freesdp/parser.c index 0774ce84f8..cb093c2bae 100644 --- a/stream/freesdp/parser.c +++ b/stream/freesdp/parser.c @@ -65,7 +65,7 @@ fsdp_parse (const char *text_description, fsdp_description_t * dsc) { fsdp_error_t result; const char *p = text_description, *p2; - unsigned int index, j; + unsigned int j; /* temps for sscanf */ const unsigned int TEMPCHARS = 6; char fsdp_buf[TEMPCHARS][MAXSHORTFIELDLEN]; @@ -252,7 +252,6 @@ fsdp_parse (const char *text_description, fsdp_description_t * dsc) return FSDPE_MISSING_TIME; dsc->time_periods = calloc (dsc->time_periods_count, sizeof (fsdp_time_period_t *)); - index = 0; for (j = 0; j < dsc->time_periods_count; j++) { unsigned int h = 0; @@ -290,11 +289,6 @@ fsdp_parse (const char *text_description, fsdp_description_t * dsc) calloc (h, sizeof (fsdp_repeat_t *)); for (h = 0; h < dsc->time_periods[j]->repeats_count; h++) { - /* - get_repeat_values(p,&(dsc->time_periods[index].repeats[index2])); - fsdp_error_t get_repeat_values (const char *r, fsdp_repeat_t - *repeat); - */ if (sscanf (p, "r=%10s %10s %" MLFLENS "[^\r\n]", fsdp_buf[0], fsdp_buf[1], longfsdp_buf) == 3) { diff --git a/stream/realrtsp/real.c b/stream/realrtsp/real.c index 3ddf9a12d0..a383f0d75d 100644 --- a/stream/realrtsp/real.c +++ b/stream/realrtsp/real.c @@ -32,6 +32,7 @@ #include "config.h" #include "libavutil/common.h" +#include "libavutil/attributes.h" #include "real.h" #include "asmrp.h" #include "sdpplin.h" @@ -316,7 +317,7 @@ int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer, int rdt_rawdata) { rmff_pheader_t ph; int size; int flags1, flags2; - int unknown1; + int unknown1 av_unused; uint32_t ts; static uint32_t prev_ts = -1; static int prev_stream_number = -1; diff --git a/stream/stream.c b/stream/stream.c index 9a3f25f8ab..fde102759c 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -165,7 +165,7 @@ static stream_t *open_stream_plugin(const stream_info_t *sinfo, arg = m_struct_alloc(desc); if(sinfo->opts_url) { m_option_t url_opt = - { "stream url", arg , CONF_TYPE_CUSTOM_URL, 0, 0 ,0, sinfo->opts }; + { "stream url", arg , CONF_TYPE_CUSTOM_URL, 0, 0 ,0, (void *)sinfo->opts }; if(m_option_parse(&url_opt,"stream url",filename,arg,M_CONFIG_FILE) < 0) { mp_msg(MSGT_OPEN,MSGL_ERR, "URL parsing failed on url %s\n",filename); m_struct_free(desc,arg); diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index b768d25682..e93c0465d8 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -95,9 +95,9 @@ static const m_option_t cdda_params_fields[] = { { "noskip", ST_OFF(no_skip), CONF_TYPE_FLAG, 0 , 0, 1, NULL }, { "skip", ST_OFF(no_skip), CONF_TYPE_FLAG, 0 , 1, 0, NULL }, { "device", ST_OFF(device), CONF_TYPE_STRING, 0, 0, 0, NULL }, - { "span", ST_OFF(span), CONF_TYPE_OBJ_PARAMS, 0, 0, 0, &m_span_params_def }, + { "span", ST_OFF(span), CONF_TYPE_OBJ_PARAMS, 0, 0, 0, (void *)&m_span_params_def }, /// For url parsing - { "hostname", ST_OFF(span), CONF_TYPE_OBJ_PARAMS, 0, 0, 0, &m_span_params_def }, + { "hostname", ST_OFF(span), CONF_TYPE_OBJ_PARAMS, 0, 0, 0, (void *)&m_span_params_def }, { "port", ST_OFF(speed), CONF_TYPE_INT, M_OPT_RANGE,1,100, NULL }, { "filename", ST_OFF(device), CONF_TYPE_STRING, 0, 0, 0, NULL }, {NULL, NULL, 0, 0, 0, 0, NULL} @@ -121,7 +121,7 @@ const m_option_t cdda_opts[] = { { "noskip", &cdda_dflts.no_skip, CONF_TYPE_FLAG, 0 , 0, 1, NULL }, { "skip", &cdda_dflts.no_skip, CONF_TYPE_FLAG, 0 , 1, 0, NULL }, { "device", &cdda_dflts.device, CONF_TYPE_STRING, 0, 0, 0, NULL }, - { "span", &cdda_dflts.span, CONF_TYPE_OBJ_PARAMS, 0, 0, 0, &m_span_params_def }, + { "span", &cdda_dflts.span, CONF_TYPE_OBJ_PARAMS, 0, 0, 0, (void *)&m_span_params_def }, {NULL, NULL, 0, 0, 0, 0, NULL} }; diff --git a/stream/tv.c b/stream/tv.c index 5ebd4bf59c..64d7b4413e 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -264,8 +264,10 @@ static int norm_from_string(tvi_handle_t *tvh, char* norm) str[sizeof(str)-1] = '\0'; ret=funcs->control(tvh->priv, TVI_CONTROL_SPC_GET_NORMID, str); - if(ret==TVI_CONTROL_TRUE) - return *(int *)str; + if (ret == TVI_CONTROL_TRUE) { + int *v = (int *)str; + return *v; + } if(ret!=TVI_CONTROL_UNKNOWN) { |