diff options
author | wm4 <wm4@nowhere> | 2013-07-23 00:45:23 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-23 00:45:23 +0200 |
commit | e83cbde1a4b816a64cefde1fb8bdbac403079600 (patch) | |
tree | 1ac71b13723174ab48465915fd5e9916faa7df35 /sub | |
parent | 78ebb3c6fa637206bb369349ba93328b36895e2b (diff) | |
download | mpv-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 'sub')
-rw-r--r-- | sub/img_convert.c | 4 | ||||
-rw-r--r-- | sub/sd_srt.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sub/img_convert.c b/sub/img_convert.c index 547f6aa265..9a5d1bf42b 100644 --- a/sub/img_convert.c +++ b/sub/img_convert.c @@ -242,8 +242,8 @@ bool osd_conv_ass_to_rgba(struct osd_conv_cache *c, struct sub_bitmaps *imgs) memset_pic(bmp->bitmap, 0, bmp->w * 4, bmp->h, bmp->stride); - for (int n = 0; n < src.num_parts; n++) { - struct sub_bitmap *s = &src.parts[n]; + for (int p = 0; p < src.num_parts; p++) { + struct sub_bitmap *s = &src.parts[p]; // Assume mp_get_sub_bb_list() never splits sub bitmaps // So we don't clip/adjust the size of the sub bitmap diff --git a/sub/sd_srt.c b/sub/sd_srt.c index 31d2959e59..b01c4dc3f8 100644 --- a/sub/sd_srt.c +++ b/sub/sd_srt.c @@ -362,10 +362,10 @@ static void convert_subrip(const char *orig, char *dest, int dest_buffer_size) for (int i = 0; i < FF_ARRAY_ELEMS(subrip_web_colors); i++) { char *color = subrip_web_colors[i].s; if (bstrcasecmp(val, bstr0(color)) == 0) { - uint32_t color = subrip_web_colors[i].v; - tag->color = ((color & 0xff) << 16) - | (color & 0xff00) - | ((color & 0xff0000) >> 16); + uint32_t xcolor = subrip_web_colors[i].v; + tag->color = ((xcolor & 0xff) << 16) + | (xcolor & 0xff00) + | ((xcolor & 0xff0000) >> 16); found = 1; } } |