[gnome-color-manager] Fix up a few trivial bugs spotted by clang



commit 9e548a73818806a36e00c2d2b28cdeb1e976ec34
Author: Richard Hughes <richard hughsie com>
Date:   Tue Nov 10 13:47:13 2009 +0000

    Fix up a few trivial bugs spotted by clang

 src/gcm-calibrate.c |    5 +----
 src/gcm-client.c    |    8 ++++----
 src/gcm-prefs.c     |    2 +-
 3 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index 7093e1f..7c916ef 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -227,6 +227,7 @@ gcm_calibrate_display_setup (GcmCalibrate *calibrate, GError **error)
 
 	/* this wasn't previously set */
 	if (!priv->is_lcd && !priv->is_crt) {
+		widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "dialog_calibrate"));
 		dialog = gtk_message_dialog_new (GTK_WINDOW(widget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_CANCEL,
 						 /* TRANSLATORS: title, usually we can tell based on the EDID data or output name */
 						 _("Could not auto-detect CRT or LCD"));
@@ -714,13 +715,9 @@ gcm_calibrate_scanner_measure (GcmCalibrate *calibrate, GError **error)
 {
 	gboolean ret = TRUE;
 	GcmCalibratePrivate *priv = calibrate->priv;
-	gchar type;
 	gchar **argv = NULL;
 	GPtrArray *array = NULL;
 
-	/* get l-cd or c-rt */
-	type = gcm_calibrate_get_display_type (calibrate);
-
 	/* argument array */
 	array = g_ptr_array_new_with_free_func (g_free);
 
diff --git a/src/gcm-client.c b/src/gcm-client.c
index 5c9e803..4d1c7bd 100644
--- a/src/gcm-client.c
+++ b/src/gcm-client.c
@@ -302,8 +302,8 @@ gcm_client_get_output_name (GnomeRROutput *output)
 	GString *string;
 	GcmEdid *edid = NULL;
 	gboolean ret;
-	guint width;
-	guint height;
+	guint width = 0;
+	guint height = 0;
 
 	/* blank */
 	string = g_string_new ("");
@@ -388,8 +388,8 @@ gcm_client_get_output_id (GnomeRROutput *output)
 	GString *string;
 	GcmEdid *edid = NULL;
 	gboolean ret;
-	guint width;
-	guint height;
+	guint width = 0;
+	guint height = 0;
 
 	/* blank */
 	string = g_string_new ("");
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 9099621..87b370c 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -286,7 +286,7 @@ gcm_prefs_calibrate_scanner_get_reference_data (void)
 static gboolean
 gcm_prefs_calibrate_scanner (GcmCalibrate *calib)
 {
-	gboolean ret;
+	gboolean ret = FALSE;
 	GError *error = NULL;
 	gchar *scanned_image = NULL;
 	gchar *reference_data = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]