summaryrefslogtreecommitdiff
path: root/libsoup/soup-message-headers.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2008-12-23 19:05:12 +0000
committerDan Winship <danw@src.gnome.org>2008-12-23 19:05:12 +0000
commit903af762e3acbbe8861b928a7b940e62e1ba0055 (patch)
tree41c453386191032349f9aa434aedd0e70a8f0669 /libsoup/soup-message-headers.c
parent811527eeeec4147bee99baf3d3633c1e07c73868 (diff)
downloadlibsoup-903af762e3acbbe8861b928a7b940e62e1ba0055.tar.gz
add some more warning CFLAGS, inspired by Benjamin Otte's blog post,
* configure.in: add some more warning CFLAGS, inspired by Benjamin Otte's blog post, although none of them picked out any actual bugs. Annoyingly, the most interesting warnings came from -Wwrite-strings and -Wshadow, both of which I decided against keeping, because they had too many false positives. * libsoup/soup-cookie-jar.c (soup_cookie_jar_get_cookies): rename a variable to avoid shadowing. * libsoup/soup-message-headers.c (soup_message_headers_get_ranges): move a variable declaration to avoid a possibly-confusing shadowing. * tests/forms-test.c: * tests/header-parsing.c: * tests/range-test.c: * tests/test-utils.c: constify some "char *"s that should have already been const. * tests/get.c (find_hrefs): rename an arg whose name shadowed a global, to avoid possible future confusion (get_url): Likewise with a functional-internal shadowing. svn path=/trunk/; revision=1222
Diffstat (limited to 'libsoup/soup-message-headers.c')
-rw-r--r--libsoup/soup-message-headers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
index fba51c0d..4ee5a867 100644
--- a/libsoup/soup-message-headers.c
+++ b/libsoup/soup-message-headers.c
@@ -723,7 +723,6 @@ soup_message_headers_get_ranges (SoupMessageHeaders *hdrs,
const char *range = soup_message_headers_get (hdrs, "Range");
GSList *range_list, *r;
GArray *array;
- SoupRange cur;
char *spec, *end;
int i;
@@ -744,6 +743,8 @@ soup_message_headers_get_ranges (SoupMessageHeaders *hdrs,
array = g_array_new (FALSE, FALSE, sizeof (SoupRange));
for (r = range_list; r; r = r->next) {
+ SoupRange cur;
+
spec = r->data;
if (*spec == '-') {
cur.start = g_ascii_strtoll (spec, &end, 10) + total_length;