[gnome-color-manager] trivial: Fix up some errors pointed out by clang



commit febe5bc10cbb44cef6ca681c2183b810378ce982
Author: Richard Hughes <richard hughsie com>
Date:   Fri Mar 25 13:02:50 2011 +0000

    trivial: Fix up some errors pointed out by clang

 docs/huey/gcm-dump-to-values.c |    3 +++
 src/gcm-calibrate-native.c     |    2 +-
 src/gcm-session.c              |   13 +++++++++++--
 3 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/docs/huey/gcm-dump-to-values.c b/docs/huey/gcm-dump-to-values.c
index 4d46abb..d9bc4bc 100644
--- a/docs/huey/gcm-dump-to-values.c
+++ b/docs/huey/gcm-dump-to-values.c
@@ -44,6 +44,9 @@ main (gint argc, gchar *argv[])
 	if (argc != 2)
 		goto out;
 
+	for (i=0; i<0xff; i++)
+		buffer[i] = 0;
+
 	//g_error ("argv[1]=%s", argv[1]);
 	ret = g_file_get_contents (argv[1], &data, NULL, &error);
 	if (!ret) {
diff --git a/src/gcm-calibrate-native.c b/src/gcm-calibrate-native.c
index c951beb..f8dfcff 100644
--- a/src/gcm-calibrate-native.c
+++ b/src/gcm-calibrate-native.c
@@ -385,7 +385,7 @@ gcm_calibrate_native_create_profile_from_it8 (GcmProfile *profile, const gchar *
 	GcmColorRGB leakage;
 	cmsHPROFILE conversion_profile = NULL;
 	cmsHPROFILE xyz_profile = NULL;
-	cmsToneCurve *transfer_curve[3];
+	cmsToneCurve *transfer_curve[3] = { NULL, NULL, NULL };
 	cmsHTRANSFORM conversion_transform = NULL;
 	gdouble *data_sampled[3] = { NULL, NULL, NULL};
 	gdouble *data_interpolated[3] = { NULL, NULL, NULL};
diff --git a/src/gcm-session.c b/src/gcm-session.c
index 23af898..cf2a4c4 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -891,7 +891,11 @@ gcm_session_get_profiles_for_file (GcmSessionPrivate *priv,
 
 	/* get list */
 	g_debug ("query=%s", filename);
-//	array_devices = cd_client_get_devices (priv->client);
+	array_devices = cd_client_get_devices_sync (priv->client,
+						    NULL,
+						    error);
+	if (array_devices == NULL)
+		goto out;
 	for (i=0; i<array_devices->len; i++) {
 		device = g_ptr_array_index (array_devices, i);
 
@@ -947,7 +951,11 @@ gcm_session_get_profiles_for_device (GcmSessionPrivate *priv,
 
 	/* get list */
 	g_debug ("query=%s [%s] %i", device_id_with_prefix, device_id, use_native_device);
-//	array_devices = cd_client_get_devices (priv->client);
+	array_devices = cd_client_get_devices_sync (priv->client,
+						    NULL,
+						    error);
+	if (array_devices == NULL)
+		goto out;
 	for (i=0; i<array_devices->len; i++) {
 		device = g_ptr_array_index (array_devices, i);
 
@@ -972,6 +980,7 @@ gcm_session_get_profiles_for_device (GcmSessionPrivate *priv,
 
 	/* unref list of devices */
 	g_ptr_array_unref (array_devices);
+out:
 	return array;
 }
 



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