diff options
author | Richard Hughes <richard@hughsie.com> | 2016-07-27 14:59:50 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-07-27 14:59:50 +0100 |
commit | 2b0f49c86f98f9ea0400d74528bfac542b25043f (patch) | |
tree | 547c3a57cc66f0965a929bd1e17c7e56189b1488 /contrib | |
parent | 4fc7521dc871da9929ae85ff93129428e3388ea0 (diff) | |
download | colord-2b0f49c86f98f9ea0400d74528bfac542b25043f.tar.gz |
Fix compile with -Wformat-signedness
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/colord-sane/Makefile.am | 2 | ||||
-rw-r--r-- | contrib/session-helper/Makefile.am | 4 | ||||
-rw-r--r-- | contrib/session-helper/cd-example.c | 4 | ||||
-rw-r--r-- | contrib/session-helper/cd-main.c | 14 | ||||
-rw-r--r-- | contrib/session-helper/cd-state.c | 20 |
5 files changed, 22 insertions, 22 deletions
diff --git a/contrib/colord-sane/Makefile.am b/contrib/colord-sane/Makefile.am index 4fd9465..1397b8b 100644 --- a/contrib/colord-sane/Makefile.am +++ b/contrib/colord-sane/Makefile.am @@ -39,7 +39,7 @@ colord_sane_LDFLAGS = \ $(PIE_LDFLAGS) colord_sane_CFLAGS = \ - $(WARNINGFLAGS_C) + $(WARN_CFLAGS) DISTCLEANFILES = \ $(dist_profile_DATA) diff --git a/contrib/session-helper/Makefile.am b/contrib/session-helper/Makefile.am index 9f45753..8388425 100644 --- a/contrib/session-helper/Makefile.am +++ b/contrib/session-helper/Makefile.am @@ -53,7 +53,7 @@ colord_session_LDFLAGS = \ $(PIE_LDFLAGS) colord_session_CFLAGS = \ - $(WARNINGFLAGS_C) + $(WARN_CFLAGS) dbusservicemaindir = $(datadir)/dbus-1/services dbusservicemain_in_files = org.freedesktop.ColorHelper.service.in @@ -80,7 +80,7 @@ colord_session_example_LDADD = \ $(GNOME_DESKTOP_LIBS) \ $(LCMS_LIBS) -lm colord_session_example_CFLAGS = \ - $(WARNINGFLAGS_C) + $(WARN_CFLAGS) test: colord-session-example ./colord-session-example \ diff --git a/contrib/session-helper/cd-example.c b/contrib/session-helper/cd-example.c index ba43512..2585988 100644 --- a/contrib/session-helper/cd-example.c +++ b/contrib/session-helper/cd-example.c @@ -271,7 +271,7 @@ cd_example_signal_cb (GDBusProxy *proxy, g_debug ("calibration succeeded with profile %s created at %s", profile_id, profile_path); } else { - g_warning ("calibration failed with code %i: %s", + g_warning ("calibration failed with code %u: %s", code, str); } g_main_loop_quit (priv->loop); @@ -299,7 +299,7 @@ cd_example_signal_cb (GDBusProxy *proxy, &code, &message, &image); - g_print ("Interaction required type %i: %s\n", + g_print ("Interaction required type %u: %s\n", code, message); cd_example_interaction_required (priv, code, diff --git a/contrib/session-helper/cd-main.c b/contrib/session-helper/cd-main.c index 8477edd..c5cd59b 100644 --- a/contrib/session-helper/cd-main.c +++ b/contrib/session-helper/cd-main.c @@ -254,7 +254,7 @@ cd_main_emit_interaction_required (CdMainPrivate *priv, message = ""; break; } - g_debug ("CdMain: Emitting InteractionRequired(%i,%s,%s)", + g_debug ("CdMain: Emitting InteractionRequired(%u,%s,%s)", code, message, image); g_dbus_connection_emit_signal (priv->connection, NULL, @@ -280,7 +280,7 @@ cd_main_emit_update_gamma (CdMainPrivate *priv, CdColorRGB *color; /* emit signal */ - g_debug ("CdMain: Emitting UpdateGamma(%i elements)", + g_debug ("CdMain: Emitting UpdateGamma(%u elements)", array->len); /* build the dict */ @@ -1667,7 +1667,7 @@ cd_main_daemon_method_call (GDBusConnection *connection, cd_profile_quality_to_string (priv->quality)); } else if (g_strcmp0 (prop_key, "Whitepoint") == 0) { priv->target_whitepoint = g_variant_get_uint32 (prop_value); - g_debug ("Whitepoint: %iK", + g_debug ("Whitepoint: %uK", priv->target_whitepoint); } else if (g_strcmp0 (prop_key, "Title") == 0) { priv->title = g_variant_dup_string (prop_value, NULL); @@ -1678,7 +1678,7 @@ cd_main_daemon_method_call (GDBusConnection *connection, cd_sensor_cap_to_string (priv->device_kind)); } else if (g_strcmp0 (prop_key, "Brightness") == 0) { priv->screen_brightness = g_variant_get_uint32 (prop_value); - g_debug ("Device brightness: %i", priv->screen_brightness); + g_debug ("Device brightness: %u", priv->screen_brightness); } else if (g_strcmp0 (prop_key, "Gamma") == 0) { priv->target_gamma = g_variant_get_double (prop_value); g_debug ("Gamma: %.2f", priv->target_gamma); @@ -1706,7 +1706,7 @@ cd_main_daemon_method_call (GDBusConnection *connection, g_dbus_method_invocation_return_error (invocation, CD_SESSION_ERROR, CD_SESSION_ERROR_INVALID_VALUE, - "invalid quality value %i", + "invalid quality value %u", priv->quality); return; } @@ -1728,7 +1728,7 @@ cd_main_daemon_method_call (GDBusConnection *connection, g_dbus_method_invocation_return_error (invocation, CD_SESSION_ERROR, CD_SESSION_ERROR_INVALID_VALUE, - "invalid target whitepoint value %i", + "invalid target whitepoint value %u", priv->target_whitepoint); return; } @@ -1970,7 +1970,7 @@ cd_main_percentage_changed_cb (CdState *state, guint value, CdMainPrivate *priv) { - g_debug ("CdMain: Emitting PropertiesChanged(Progress) %i", value); + g_debug ("CdMain: Emitting PropertiesChanged(Progress) %u", value); cd_main_emit_property_changed (priv, "Progress", g_variant_new_uint32 (value)); diff --git a/contrib/session-helper/cd-state.c b/contrib/session-helper/cd-state.c index 11987a2..a3b32e8 100644 --- a/contrib/session-helper/cd-state.c +++ b/contrib/session-helper/cd-state.c @@ -113,7 +113,7 @@ cd_state_print_parent_chain (CdState *state, guint level) { if (state->priv->parent != NULL) cd_state_print_parent_chain (state->priv->parent, level + 1); - g_print ("%i) %s (%i/%i)\n", + g_print ("%u) %s (%u/%u)\n", level, state->priv->id, state->priv->current, state->priv->steps); } @@ -130,7 +130,7 @@ cd_state_set_percentage (CdState *state, guint percentage) /* is it invalid */ if (percentage > 100) { cd_state_print_parent_chain (state, 0); - g_warning ("percentage %i%% is invalid on %p!", + g_warning ("percentage %u%% is invalid on %p!", percentage, state); return FALSE; } @@ -139,7 +139,7 @@ cd_state_set_percentage (CdState *state, guint percentage) if (percentage < state->priv->last_percentage) { if (state->priv->enable_profile) { cd_state_print_parent_chain (state, 0); - g_critical ("percentage should not go down from %i to %i on %p!", + g_critical ("percentage should not go down from %u to %u on %p!", state->priv->last_percentage, percentage, state); } return FALSE; @@ -207,7 +207,7 @@ cd_state_child_percentage_changed_cb (CdState *child, guint percentage, CdState /* already at >= 100% */ if (state->priv->current >= state->priv->steps) { - g_warning ("already at %i/%i steps on %p", state->priv->current, state->priv->steps, state); + g_warning ("already at %u/%u steps on %p", state->priv->current, state->priv->steps, state); return; } @@ -230,7 +230,7 @@ cd_state_child_percentage_changed_cb (CdState *child, guint percentage, CdState /* get the range between the parent step and the next parent step */ range = cd_state_discrete_to_percent (state->priv->current+1, state->priv->steps) - offset; if (range < 0.01) { - g_warning ("range=%f (from %i to %i), should be impossible", range, state->priv->current+1, state->priv->steps); + g_warning ("range=%f (from %u to %u), should be impossible", range, state->priv->current+1, state->priv->steps); return; } @@ -368,7 +368,7 @@ cd_state_set_number_steps_real (CdState *state, guint steps, const gchar *strloc /* did we call done on a state that did not have a size set? */ if (state->priv->steps != 0) { - g_warning ("steps already set to %i, can't set %i! [%s]", + g_warning ("steps already set to %u, can't set %u! [%s]", state->priv->steps, steps, strloc); cd_state_print_parent_chain (state, 0); return FALSE; @@ -425,7 +425,7 @@ cd_state_set_steps_real (CdState *state, GError **error, const gchar *strloc, gi g_set_error (error, CD_STATE_ERROR, CD_STATE_ERROR_INVALID, - "percentage not 100: %i", + "percentage not 100: %u", total); return FALSE; } @@ -435,7 +435,7 @@ cd_state_set_steps_real (CdState *state, GError **error, const gchar *strloc, gi g_set_error (error, CD_STATE_ERROR, CD_STATE_ERROR_INVALID, - "failed to set number steps: %i", + "failed to set number steps: %u", i+1); return FALSE; } @@ -479,7 +479,7 @@ cd_state_show_profile (CdState *state) /* what we set */ result = g_string_new ("steps were set as [ "); for (i = 0; i < state->priv->steps; i++) { - g_string_append_printf (result, "%i, ", + g_string_append_printf (result, "%u, ", state->priv->step_data[i] - uncumalitive); uncumalitive = state->priv->step_data[i]; } @@ -535,7 +535,7 @@ cd_state_done_real (CdState *state, GError **error, const gchar *strloc) if (state->priv->child != NULL) { CdStatePrivate *child_priv = state->priv->child->priv; if (child_priv->current != child_priv->steps) { - g_print ("child is at %i/%i steps and parent done [%s]\n", + g_print ("child is at %u/%u steps and parent done [%s]\n", child_priv->current, child_priv->steps, strloc); cd_state_print_parent_chain (state->priv->child, 0); /* do not abort, as we want to clean this up */ |