diff options
author | Dan Winship <danw@src.gnome.org> | 2008-12-23 19:05:12 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2008-12-23 19:05:12 +0000 |
commit | 903af762e3acbbe8861b928a7b940e62e1ba0055 (patch) | |
tree | 41c453386191032349f9aa434aedd0e70a8f0669 /tests/test-utils.c | |
parent | 811527eeeec4147bee99baf3d3633c1e07c73868 (diff) | |
download | libsoup-903af762e3acbbe8861b928a7b940e62e1ba0055.tar.gz libsoup-903af762e3acbbe8861b928a7b940e62e1ba0055.tar.bz2 libsoup-903af762e3acbbe8861b928a7b940e62e1ba0055.zip |
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 'tests/test-utils.c')
-rw-r--r-- | tests/test-utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-utils.c b/tests/test-utils.c index c5e2918b..bc48a551 100644 --- a/tests/test-utils.c +++ b/tests/test-utils.c @@ -148,9 +148,9 @@ debug_printf (int level, const char *format, ...) #ifdef HAVE_APACHE static gboolean -apache_cmd (char *cmd) +apache_cmd (const char *cmd) { - char *argv[8]; + const char *argv[8]; char *cwd, *conf; int status; gboolean ok; @@ -167,7 +167,7 @@ apache_cmd (char *cmd) argv[6] = cmd; argv[7] = NULL; - ok = g_spawn_sync (cwd, argv, NULL, 0, NULL, NULL, + ok = g_spawn_sync (cwd, (char **)argv, NULL, 0, NULL, NULL, NULL, NULL, &status, NULL); if (ok) ok = (status == 0); |