[glib] Fix sparse warnings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix sparse warnings
- Date: Sat, 10 Jul 2010 21:23:15 +0000 (UTC)
commit 5f1490e94aa0fcfe72b92377dc7efae4b3300a6c
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jul 10 17:21:32 2010 -0400
Fix sparse warnings
These were listed in bug 623955
gio/gconverteroutputstream.c | 2 +-
gio/gdbusauthmechanismsha1.c | 4 ++--
gio/gdbusconnection.c | 2 +-
gio/gfileinfo.c | 4 ++--
gio/ginetsocketaddress.c | 2 +-
gio/gmount.c | 6 +++---
gio/gschema-compile.c | 6 +++---
gio/gunixfdmessage.c | 2 +-
gio/gunixresolver.c | 9 ++++++---
9 files changed, 20 insertions(+), 17 deletions(-)
---
diff --git a/gio/gconverteroutputstream.c b/gio/gconverteroutputstream.c
index f4f8661..52b8da1 100644
--- a/gio/gconverteroutputstream.c
+++ b/gio/gconverteroutputstream.c
@@ -584,7 +584,7 @@ g_converter_output_stream_flush (GOutputStream *stream,
/* Any other error, including PARTIAL_INPUT can't be fixed by now
and is an error */
g_propagate_error (error, my_error);
- return -1;
+ return FALSE;
}
}
diff --git a/gio/gdbusauthmechanismsha1.c b/gio/gdbusauthmechanismsha1.c
index badc108..9fa7478 100644
--- a/gio/gdbusauthmechanismsha1.c
+++ b/gio/gdbusauthmechanismsha1.c
@@ -359,8 +359,8 @@ keyring_lookup_entry (const gchar *cookie_context,
guint n;
gchar **lines;
- g_return_val_if_fail (cookie_context != NULL, FALSE);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+ g_return_val_if_fail (cookie_context != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
ret = NULL;
path = NULL;
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 4ae81ae..80f1fe4 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -4802,7 +4802,7 @@ g_dbus_connection_call_finish (GDBusConnection *connection,
simple = G_SIMPLE_ASYNC_RESULT (res);
if (g_simple_async_result_propagate_error (simple, error))
- return FALSE;
+ return NULL;
return g_variant_ref (g_simple_async_result_get_op_res_gpointer (simple));
}
diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c
index 3426b13..264ccf1 100644
--- a/gio/gfileinfo.c
+++ b/gio/gfileinfo.c
@@ -793,8 +793,8 @@ g_file_info_set_attribute_status (GFileInfo *info,
{
GFileAttributeValue *val;
- g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
- g_return_val_if_fail (attribute != NULL && *attribute != '\0', 0);
+ g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
+ g_return_val_if_fail (attribute != NULL && *attribute != '\0', FALSE);
val = g_file_info_find_value_by_name (info, attribute);
if (val)
diff --git a/gio/ginetsocketaddress.c b/gio/ginetsocketaddress.c
index d1e32e4..5f6b291 100644
--- a/gio/ginetsocketaddress.c
+++ b/gio/ginetsocketaddress.c
@@ -166,7 +166,7 @@ g_inet_socket_address_to_native (GSocketAddress *address,
GInetSocketAddress *addr;
GSocketFamily family;
- g_return_val_if_fail (G_IS_INET_SOCKET_ADDRESS (address), 0);
+ g_return_val_if_fail (G_IS_INET_SOCKET_ADDRESS (address), FALSE);
addr = G_INET_SOCKET_ADDRESS (address);
family = g_inet_address_get_family (addr->priv->address);
diff --git a/gio/gmount.c b/gio/gmount.c
index 270cfc3..402dabd 100644
--- a/gio/gmount.c
+++ b/gio/gmount.c
@@ -812,14 +812,14 @@ g_mount_guess_content_type_finish (GMount *mount,
{
GMountIface *iface;
- g_return_val_if_fail (G_IS_MOUNT (mount), FALSE);
- g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+ g_return_val_if_fail (G_IS_MOUNT (mount), NULL);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), NULL);
if (G_IS_SIMPLE_ASYNC_RESULT (result))
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
if (g_simple_async_result_propagate_error (simple, error))
- return FALSE;
+ return NULL;
}
iface = G_MOUNT_GET_IFACE (mount);
diff --git a/gio/gschema-compile.c b/gio/gschema-compile.c
index 8923723..f865ba0 100644
--- a/gio/gschema-compile.c
+++ b/gio/gschema-compile.c
@@ -1575,18 +1575,18 @@ parse_gschema_files (gchar **files,
&state, NULL);
if (!g_file_get_contents (filename, &contents, &size, error))
- return FALSE;
+ return NULL;
if (!g_markup_parse_context_parse (context, contents, size, error))
{
g_prefix_error (error, "%s: ", filename);
- return FALSE;
+ return NULL;
}
if (!g_markup_parse_context_end_parse (context, error))
{
g_prefix_error (error, "%s: ", filename);
- return FALSE;
+ return NULL;
}
g_markup_parse_context_free (context);
diff --git a/gio/gunixfdmessage.c b/gio/gunixfdmessage.c
index 766a4e2..665f058 100644
--- a/gio/gunixfdmessage.c
+++ b/gio/gunixfdmessage.c
@@ -285,7 +285,7 @@ gint *
g_unix_fd_message_steal_fds (GUnixFDMessage *message,
gint *length)
{
- g_return_val_if_fail (G_UNIX_FD_MESSAGE (message), FALSE);
+ g_return_val_if_fail (G_UNIX_FD_MESSAGE (message), NULL);
return g_unix_fd_list_steal_fds (message->priv->list, length);
}
diff --git a/gio/gunixresolver.c b/gio/gunixresolver.c
index d60fcf7..ed5e2d1 100644
--- a/gio/gunixresolver.c
+++ b/gio/gunixresolver.c
@@ -344,7 +344,8 @@ lookup_by_name_finish (GResolver *resolver,
GUnixResolverRequest *req;
GList *addresses;
- g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (resolver), lookup_by_name_async), FALSE);
+ g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (resolver), lookup_by_name_async), NULL);
+
simple = G_SIMPLE_ASYNC_RESULT (result);
if (g_simple_async_result_propagate_error (simple, error))
@@ -418,7 +419,8 @@ lookup_by_address_finish (GResolver *resolver,
GUnixResolverRequest *req;
gchar *name;
- g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (resolver), lookup_by_address_async), FALSE);
+ g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (resolver), lookup_by_address_async), NULL);
+
simple = G_SIMPLE_ASYNC_RESULT (result);
if (g_simple_async_result_propagate_error (simple, error))
@@ -491,7 +493,8 @@ lookup_service_finish (GResolver *resolver,
GUnixResolverRequest *req;
GList *targets;
- g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (resolver), lookup_service_async), FALSE);
+ g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (resolver), lookup_service_async), NULL);
+
simple = G_SIMPLE_ASYNC_RESULT (result);
if (g_simple_async_result_propagate_error (simple, error))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]