[phodav] build-sys: actually use WARN_CFLAGS
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phodav] build-sys: actually use WARN_CFLAGS
- Date: Wed, 22 Jan 2014 20:19:36 +0000 (UTC)
commit 3a872e26702ee32915644b0235302d0a63e5e31e
Author: Marc-André Lureau <marcandre lureau gmail com>
Date: Wed Jan 22 21:17:34 2014 +0100
build-sys: actually use WARN_CFLAGS
Makefile.am | 1 +
configure.ac | 1 +
libphodav/phodav-server.c | 8 ++++----
3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 53e36c3..e08584e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,6 +15,7 @@ sbin_PROGRAMS = spice-webdavd
AM_CPPFLAGS = \
-DLOCALEDIR=\""$(localedir)"\" \
-DG_LOG_DOMAIN=\"phodav\" \
+ $(WARN_CFLAGS) \
$(NULL)
libphodav_la_SOURCES = \
diff --git a/configure.ac b/configure.ac
index 89c5cc9..c028b28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,7 @@ nw="$nw -Wunused-parameter" # Likewise.
nw="$nw -Wunused-local-typedefs" # Likewise.
nw="$nw -Wunused-macros" # Likewise.
nw="$nw -Wunsafe-loop-optimizations" # Likewise.
+nw="$nw -Wbad-function-cast" # Likewise.
# Enable all GCC warnings not in this list.
gl_MANYWARN_COMPLEMENT([warnings], [$warnings], [$nw])
for w in $warnings; do
diff --git a/libphodav/phodav-server.c b/libphodav/phodav-server.c
index 170f526..ac41b40 100644
--- a/libphodav/phodav-server.c
+++ b/libphodav/phodav-server.c
@@ -969,7 +969,7 @@ depth_to_string (DepthType depth)
}
static gchar *
-node_get_xattr_name (xmlNodePtr node, gchar *prefix)
+node_get_xattr_name (xmlNodePtr node, const gchar *prefix)
{
const gchar *ns = node->ns ? (gchar *) node->ns->href : NULL;
const gchar *name = (gchar *) node->name;
@@ -2682,7 +2682,7 @@ end:
return status;
}
-static gboolean
+static gboolean G_GNUC_PURE
check_lock (const gchar *key, Path *path, gpointer data)
{
DAVLock *lock = data;
@@ -2929,8 +2929,8 @@ server_callback (SoupServer *server, SoupMessage *msg,
return;
}
- params = g_hash_table_new (g_str_hash, g_str_equal);
- g_hash_table_insert (params, "charset", "utf-8");
+ params = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ g_hash_table_insert (params, g_strdup ("charset"), g_strdup ("utf-8"));
soup_message_headers_set_content_type (msg->response_headers,
"text/xml", params);
g_hash_table_destroy (params);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]