]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Fix msvc sign-compare warning on Windows7 64bit by adding a type cast.
authorRalf Habacker <ralf.habacker@freenet.de>
Mon, 20 Apr 2015 10:35:53 +0000 (12:35 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Mon, 20 Apr 2015 11:25:54 +0000 (13:25 +0200)
The related warning is: C4267: 'function' : conversion from 'size_t' to 'int', possible loss of data.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90089
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus/dbus-auth-script.c

index 164743b0b60376bc3b51a5a50ffcbc038a999ee0..03be4e20b899ea39f40118c9ae5c25786d287e81 100644 (file)
@@ -527,7 +527,7 @@ _dbus_auth_script_run (const DBusString *filename)
                     goto out;
                   }
 
-                _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 +560,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))