summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-23 00:45:23 +0200
committerwm4 <wm4@nowhere>2013-07-23 00:45:23 +0200
commite83cbde1a4b816a64cefde1fb8bdbac403079600 (patch)
tree1ac71b13723174ab48465915fd5e9916faa7df35 /stream
parent78ebb3c6fa637206bb369349ba93328b36895e2b (diff)
downloadmpv-e83cbde1a4b816a64cefde1fb8bdbac403079600.tar.bz2
mpv-e83cbde1a4b816a64cefde1fb8bdbac403079600.tar.xz
Fix some -Wshadow warnings
In general, this warning can hint to actual bugs. We don't enable it yet, because it would conflict with some unmerged code, and we should check with clang too (this commit was done by testing with gcc).
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_cdda.c5
-rw-r--r--stream/tv.c3
-rw-r--r--stream/tvi_v4l2.c5
3 files changed, 5 insertions, 8 deletions
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c
index 670f47e156..f245a6fe94 100644
--- a/stream/stream_cdda.c
+++ b/stream/stream_cdda.c
@@ -410,9 +410,8 @@ static int open_cdda(stream_t *st, int m, void *opts)
offset -= cdda_track_firstsector(cdd, 1);
if (offset) {
- int i;
- for (i = 0; i < cdd->tracks + 1; i++)
- cdd->disc_toc[i].dwStartSector += offset;
+ for (int n = 0; n < cdd->tracks + 1; n++)
+ cdd->disc_toc[n].dwStartSector += offset;
}
if (p->speed > 0)
diff --git a/stream/tv.c b/stream/tv.c
index 9b1f8024e4..79b70243fd 100644
--- a/stream/tv.c
+++ b/stream/tv.c
@@ -553,7 +553,6 @@ static int open_tv(tvi_handle_t *tvh)
tv_channel_last_real = malloc(5);
if (tv_channel_list) {
- int i;
int channel = 0;
if (tvh->tv_param->channel)
{
@@ -579,7 +578,7 @@ static int open_tv(tvi_handle_t *tvh)
if ( channel ) {
tv_channel_current = tv_channel_list;
- for (i = 1; i < channel; i++)
+ for (int n = 1; n < channel; n++)
if (tv_channel_current->next)
tv_channel_current = tv_channel_current->next;
}
diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c
index 06344d1fa9..e23ad1ea73 100644
--- a/stream/tvi_v4l2.c
+++ b/stream/tvi_v4l2.c
@@ -1103,9 +1103,8 @@ static int uninit(priv_t *priv)
free(priv->video_dev); priv->video_dev = NULL;
if (priv->video_ringbuffer) {
- int i;
- for (i = 0; i < priv->video_buffer_size_current; i++) {
- free(priv->video_ringbuffer[i].data);
+ for (int n = 0; n < priv->video_buffer_size_current; n++) {
+ free(priv->video_ringbuffer[n].data);
}
free(priv->video_ringbuffer);
}