diff options
author | wm4 <wm4@nowhere> | 2013-11-01 13:00:15 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-01 13:00:15 +0100 |
commit | dd344b43e87ef5a24a4ba739821998605e38a015 (patch) | |
tree | c0066b9e73fbb6f7ba5a46fed65db9a3a53a9695 /stream/rar.c | |
parent | 2696148d64364b40e7b0d1d3de017d6afce4b43d (diff) | |
download | mpv-dd344b43e87ef5a24a4ba739821998605e38a015.tar.bz2 mpv-dd344b43e87ef5a24a4ba739821998605e38a015.tar.xz |
Enable -Wshadow
This one really did bite me hard (see previous commit), so enable it by
default.
Fix some cases of shadowing throughout the codebase. None of these
change behavior, and all of these were correct code, and just tripped up
the warning.
Diffstat (limited to 'stream/rar.c')
-rw-r--r-- | stream/rar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stream/rar.c b/stream/rar.c index fd4dbf008d..4147a86866 100644 --- a/stream/rar.c +++ b/stream/rar.c @@ -188,12 +188,12 @@ static int SkipFile(struct stream *s, int *count, rar_file_t ***file, const int name_offset = (hdr->flags & RAR_BLOCK_FILE_HAS_HIGH) ? (7+33) : (7+25); if (name_offset + name_size <= hdr->size) { const int max_size = name_offset + name_size; - bstr data = stream_peek(s, max_size); - if (data.len < max_size) { + bstr namedata = stream_peek(s, max_size); + if (namedata.len < max_size) { free(name); return -1; } - memcpy(name, &data.start[name_offset], name_size); + memcpy(name, &namedata.start[name_offset], name_size); } rar_file_t *current = NULL; |