From dd344b43e87ef5a24a4ba739821998605e38a015 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 1 Nov 2013 13:00:15 +0100 Subject: 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. --- stream/rar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'stream/rar.c') 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; -- cgit v1.2.3