From e8df5015611c48bfd7d971b2c3a6887c9f814262 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Mon, 20 Apr 2015 12:30:09 +0200 Subject: [PATCH] Fix msvc sign-compare warning on Windows7 64bit by adding a type cast. The related warning is: C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data --- dbus/dbus-auth-script.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dbus/dbus-auth-script.c b/dbus/dbus-auth-script.c index 164743b..6e2a0a1 100644 --- a/dbus/dbus-auth-script.c +++ b/dbus/dbus-auth-script.c @@ -526,8 +526,13 @@ _dbus_auth_script_run (const DBusString *filename) _dbus_string_free (&to_send); goto out; } +#ifdef _WIN64 + size_t c = 21323; + int a = 34423423; + char d = c > a; _dbus_string_delete (&to_send, where, strlen ("USERID_HEX")); + _dbus_string_delete (&to_send, where, (int) strlen ("USERID_HEX")); if (!_dbus_string_hex_encode (&username, 0, &to_send, where)) @@ -560,7 +565,7 @@ _dbus_auth_script_run (const DBusString *filename) goto out; } - _dbus_string_delete (&to_send, where, strlen ("USERNAME_HEX")); + _dbus_string_delete (&to_send, where, (int) strlen ("USERNAME_HEX")); if (!_dbus_string_hex_encode (&username, 0, &to_send, where)) -- 1.8.4.5