diff options
author | Dan Winship <danw@gnome.org> | 2013-10-17 17:56:29 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2013-10-17 17:56:29 -0400 |
commit | 3c96f1977a556b76bc768edeb78497a2e92dd898 (patch) | |
tree | 6a5fcfc63be748cbb8b502aaba8dbc95f9dffd56 | |
parent | 40e6a48ea7f2d1fb949d2843100e3f30cd2a73d5 (diff) | |
download | libsoup-3c96f1977a556b76bc768edeb78497a2e92dd898.tar.gz |
soup-logger: fix -Wformat-nonliteral warnings in clang
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | libsoup/soup-logger.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index f498b963..3759baba 100644 --- a/configure.ac +++ b/configure.ac @@ -340,6 +340,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then -Wall -Wstrict-prototypes -Werror=missing-prototypes \ -Werror=implicit-function-declaration \ -Werror=pointer-arith -Werror=init-self -Werror=format=2 \ + -Wno-format-zero-length \ -Werror=missing-include-dirs -Werror=aggregate-return \ -Werror=declaration-after-statement" fi diff --git a/libsoup/soup-logger.c b/libsoup/soup-logger.c index a441f211..34a55764 100644 --- a/libsoup/soup-logger.c +++ b/libsoup/soup-logger.c @@ -374,6 +374,9 @@ soup_logger_detach (SoupLogger *logger, soup_session_remove_feature (session, SOUP_SESSION_FEATURE (logger)); } +static void soup_logger_print (SoupLogger *logger, SoupLoggerLogLevel level, + char direction, const char *format, ...) G_GNUC_PRINTF (4, 5); + static void soup_logger_print (SoupLogger *logger, SoupLoggerLogLevel level, char direction, const char *format, ...) @@ -434,7 +437,7 @@ soup_logger_print_basic_auth (SoupLogger *logger, const char *value) *p = '*'; } soup_logger_print (logger, SOUP_LOGGER_LOG_HEADERS, '>', - "Authorization: Basic [%.*s]", len, decoded); + "Authorization: Basic [%.*s]", (int)len, decoded); g_free (decoded); } |