[libgnome-keyring] Fix build with -Werror and gcc 4.5
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgnome-keyring] Fix build with -Werror and gcc 4.5
- Date: Tue, 30 Mar 2010 23:16:40 +0000 (UTC)
commit 79cf1d118d501a6663c218f1bd2d438b0d405f96
Author: Vincent Untz <vuntz gnome org>
Date: Tue Mar 30 23:27:39 2010 +0200
Fix build with -Werror and gcc 4.5
There's this new warning with gcc 4.5 (I think):
comparison between â??GnomeKeyringResultâ?? and â??enum <anonymous>â??
which requires us to add some cast to avoid an error with -Werror.
library/gkr-operation.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/library/gkr-operation.c b/library/gkr-operation.c
index 37c5cb5..214ecc7 100644
--- a/library/gkr-operation.c
+++ b/library/gkr-operation.c
@@ -166,7 +166,7 @@ gboolean
gkr_operation_set_result (GkrOperation *op, GnomeKeyringResult res)
{
g_assert (op);
- g_assert (res != INCOMPLETE);
+ g_assert ((int) res != INCOMPLETE);
g_atomic_int_compare_and_exchange (&op->result, INCOMPLETE, res);
return g_atomic_int_get (&op->result) == res; /* Success when already set to res */
}
@@ -367,12 +367,12 @@ gkr_operation_block (GkrOperation *op)
gkr_operation_ref (op);
- while (gkr_operation_get_result (op) == INCOMPLETE) {
+ while ((int) gkr_operation_get_result (op) == INCOMPLETE) {
if (op->pending) {
dbus_pending_call_block (op->pending);
} else if (op->prompting) {
dbus_connection_flush (op->conn);
- while (op->prompting && gkr_operation_get_result (op) == INCOMPLETE) {
+ while (op->prompting && (int) gkr_operation_get_result (op) == INCOMPLETE) {
if (!dbus_connection_read_write_dispatch (op->conn, 200))
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]