[gdm] Fix clang complaints
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gdm] Fix clang complaints
- Date: Sat, 10 Oct 2009 20:22:33 +0000 (UTC)
commit c20176d4aa68cba21eaeae01ceb562f4773c3bb5
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Oct 10 16:20:06 2009 -0400
Fix clang complaints
See bug 597975.
common/gdm-address.c | 7 +++++--
daemon/gdm-session-worker.c | 5 ++++-
daemon/gdm-slave.c | 3 +--
gui/simple-greeter/gdm-cell-renderer-timer.c | 2 +-
gui/simple-greeter/gdm-user.c | 4 ++--
gui/simple-greeter/test-remote-login-window.c | 2 +-
6 files changed, 14 insertions(+), 9 deletions(-)
---
diff --git a/common/gdm-address.c b/common/gdm-address.c
index aa6f851..936ecfa 100644
--- a/common/gdm-address.c
+++ b/common/gdm-address.c
@@ -132,6 +132,7 @@ gdm_address_get_sockaddr_storage (GdmAddress *address)
struct sockaddr_storage *ss;
g_return_val_if_fail (address != NULL, NULL);
+ g_return_val_if_fail (address->ss != NULL, NULL);
ss = g_memdup (address->ss, sizeof (struct sockaddr_storage));
@@ -200,7 +201,8 @@ gdm_address_get_hostname (GdmAddress *address,
int res;
gboolean ret;
- g_return_val_if_fail (address != NULL || address->ss != NULL, FALSE);
+ g_return_val_if_fail (address != NULL, FALSE);
+ g_return_val_if_fail (address->ss != NULL, FALSE);
ret = FALSE;
@@ -238,7 +240,8 @@ gdm_address_get_numeric_info (GdmAddress *address,
int res;
gboolean ret;
- g_return_val_if_fail (address != NULL || address->ss != NULL, FALSE);
+ g_return_val_if_fail (address != NULL, FALSE);
+ g_return_val_if_fail (address->ss != NULL, FALSE);
ret = FALSE;
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 7a1fafb..47a5c08 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -183,6 +183,8 @@ open_ck_session (GdmSessionWorker *worker)
const char *display_hostname;
gboolean is_local;
+ ret = FALSE;
+
if (worker->priv->x11_display_name != NULL) {
display_name = worker->priv->x11_display_name;
} else {
@@ -212,7 +214,7 @@ open_ck_session (GdmSessionWorker *worker)
pwent = getpwnam (worker->priv->username);
if (pwent == NULL) {
- return FALSE;
+ goto out;
}
worker->priv->ckc = ck_connector_new ();
@@ -1660,6 +1662,7 @@ gdm_session_worker_accredit_user (GdmSessionWorker *worker,
&shell);
if (! res) {
g_debug ("GdmSessionWorker: Unable to lookup account info");
+ error_code = PAM_AUTHINFO_UNAVAIL;
g_set_error (error,
GDM_SESSION_WORKER_ERROR,
GDM_SESSION_WORKER_ERROR_GIVING_CREDENTIALS,
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index 79bdfd1..516e80f 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -789,7 +789,6 @@ gdm_slave_parse_enriched_login (GdmSlave *slave,
char **argv;
char *std_output;
char *std_error;
- int *exit_status;
/* Remove the pipe symbol */
username[username_length-1] = '\0';
@@ -814,7 +813,7 @@ gdm_slave_parse_enriched_login (GdmSlave *slave,
NULL,
&std_output,
&std_error,
- exit_status,
+ NULL,
&error);
g_ptr_array_foreach (env, (GFunc)g_free, NULL);
diff --git a/gui/simple-greeter/gdm-cell-renderer-timer.c b/gui/simple-greeter/gdm-cell-renderer-timer.c
index aac11d0..7918b48 100644
--- a/gui/simple-greeter/gdm-cell-renderer-timer.c
+++ b/gui/simple-greeter/gdm-cell-renderer-timer.c
@@ -119,7 +119,7 @@ gdm_cell_renderer_timer_get_size (GtkCellRenderer *cell,
if (cell->height >= 0) {
*height = cell->height;
} else {
- *width = renderer->priv->value <= G_MINDOUBLE? 0 : 64;
+ *height = renderer->priv->value <= G_MINDOUBLE? 0 : 64;
}
}
}
diff --git a/gui/simple-greeter/gdm-user.c b/gui/simple-greeter/gdm-user.c
index 32d3d6a..79d8628 100644
--- a/gui/simple-greeter/gdm-user.c
+++ b/gui/simple-greeter/gdm-user.c
@@ -718,8 +718,8 @@ gdm_user_collate (GdmUser *user1,
gulong num1;
gulong num2;
- g_return_val_if_fail (user1 == NULL || GDM_IS_USER (user1), 0);
- g_return_val_if_fail (user2 == NULL || GDM_IS_USER (user2), 0);
+ g_return_val_if_fail (GDM_IS_USER (user1), 0);
+ g_return_val_if_fail (GDM_IS_USER (user2), 0);
if (user1->real_name != NULL) {
str1 = user1->real_name;
diff --git a/gui/simple-greeter/test-remote-login-window.c b/gui/simple-greeter/test-remote-login-window.c
index 84d191a..e36cdb0 100644
--- a/gui/simple-greeter/test-remote-login-window.c
+++ b/gui/simple-greeter/test-remote-login-window.c
@@ -39,7 +39,7 @@ main (int argc, char *argv[])
char *std_out;
char *hostname;
GRegex *re;
- GMatchInfo *match_info;
+ GMatchInfo *match_info = NULL;
gboolean res;
GError *error;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]