From 6312a458417eae83901e31bf4da9756c6b7d78c5 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 3 Mar 2015 21:26:31 +0100 Subject: [PATCH 1/6] -Wsign-compare fixes [smcv: remove the part that touches add_linux_security_label_to_credentials, which is more subtle] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=17289 Reviewed-by: Simon McVittie --- bus/signals.c | 3 ++- dbus/dbus-message.c | 2 +- tools/dbus-print-message.c | 2 +- tools/dbus-spam.c | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bus/signals.c b/bus/signals.c index 260dd24..e8def9f 100644 --- a/bus/signals.c +++ b/bus/signals.c @@ -848,7 +848,8 @@ bus_match_rule_parse_arg_match (BusMatchRule *rule, if (end != length) { - if ((end + strlen ("path")) == length && + int len1 = strlen ("path"); + if ((end + len1) == length && _dbus_string_ends_with_c_str (&key_str, "path")) { is_path = TRUE; diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 01c2367..22da695 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -602,7 +602,7 @@ static void close_unix_fds(int *fds, unsigned *n_fds) { DBusError e; - int i; + unsigned int i; if (*n_fds <= 0) return; diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c index 4a2a9c8..bd0817c 100644 --- a/tools/dbus-print-message.c +++ b/tools/dbus-print-message.c @@ -68,7 +68,7 @@ indent (int depth) static void print_hex (const unsigned char *bytes, - int len, + unsigned int len, int depth) { unsigned int i, columns; diff --git a/tools/dbus-spam.c b/tools/dbus-spam.c index ce91875..e708ea2 100644 --- a/tools/dbus-spam.c +++ b/tools/dbus-spam.c @@ -155,9 +155,9 @@ dbus_test_tool_spam (int argc, char **argv) int i; int count = 1; int sent = 0; - int sent_in_this_conn = 0; + unsigned int sent_in_this_conn = 0; int received = 0; - int received_before_this_conn = 0; + unsigned int received_before_this_conn = 0; int queue_len = 1; const char *payload = NULL; char *payload_buf = NULL; -- 2.1.4