[gnome-color-manager] trivial: fix compile with GCC 4.6



commit 8e6786edea44a44344e342ba058d0bd9c74ba348
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jan 28 17:03:16 2011 +0000

    trivial: fix compile with GCC 4.6

 docs/gcm-parse-beagle.c    |    2 +-
 libcolor-glib/gcm-usb.c    |    4 ++++
 src/gcm-calibrate-native.c |    7 +------
 3 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/docs/gcm-parse-beagle.c b/docs/gcm-parse-beagle.c
index 7061cbc..6ac6b0c 100644
--- a/docs/gcm-parse-beagle.c
+++ b/docs/gcm-parse-beagle.c
@@ -68,7 +68,7 @@ gcm_parse_beagle_process_entry_huey (GcmParseEntry *entry)
 	guchar cmd;
 	guchar instruction = 0;
 	const gchar *command_as_text;
-	GString *output;
+	GString *output = NULL;
 
 	entry->ep_description = "default";
 
diff --git a/libcolor-glib/gcm-usb.c b/libcolor-glib/gcm-usb.c
index 43902af..424cd30 100644
--- a/libcolor-glib/gcm-usb.c
+++ b/libcolor-glib/gcm-usb.c
@@ -234,6 +234,10 @@ gcm_usb_source_dispatch (GSource *source, GSourceFunc callback, gpointer user_da
 	struct timeval tv = { 0, 0 };
 	GcmUsb *usb = user_data;
 	r = libusb_handle_events_timeout (usb->priv->ctx, &tv);
+	if (r < 0) {
+		g_warning ("failed to handle event: %s",
+			   libusb_strerror (retval));
+	}
 	return TRUE;
 }
 
diff --git a/src/gcm-calibrate-native.c b/src/gcm-calibrate-native.c
index 84ae0c0..b567546 100644
--- a/src/gcm-calibrate-native.c
+++ b/src/gcm-calibrate-native.c
@@ -167,16 +167,11 @@ gcm_calibrate_native_create_it8_file (GcmCalibrateNative *calibrate_native, GcmS
 	GcmColorSample *sample;
 	GPtrArray *array;
 	GcmColorRGB source;
-	GcmColorXYZ result;
 	gdouble divisions;
 
 	/* step size */
 	divisions = 1.0f / (gfloat) (steps - 1);
 
-	result.X = 0.1;
-	result.Y = 0.2;
-	result.Z = 0.3;
-
 	array = g_ptr_array_new_with_free_func ((GDestroyNotify) gcm_calibrate_native_sample_free_cb);
 
 	/* blue */
@@ -719,7 +714,7 @@ gcm_calibrate_native_display (GcmCalibrate *calibrate, GtkWindow *window, GError
 		steps = 30;
 
 	g_debug ("creating %s", filename_it8);
-	gcm_calibrate_native_create_it8_file (calibrate_native, sensor, filename_it8, 10);
+	gcm_calibrate_native_create_it8_file (calibrate_native, sensor, filename_it8, steps);
 
 	/* get profile text data */
 	copyright = gcm_calibrate_get_profile_copyright (calibrate);



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