From 1d4908fd3fe7d8e97ad6fba6cc2e650c0606929a Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Wed, 29 Apr 2015 22:10:43 +0200 Subject: [PATCH] dbus_daemon_publish_session_bus_address: Fix -Wsign-compare issue. https://bugs.freedesktop.org/show_bug.cgi?id=90089 --- dbus/dbus-sysdeps-win.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 6e59c5e..c1133f2 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -2965,8 +2965,15 @@ _dbus_daemon_publish_session_bus_address (const char* address, const char *scope } // create shm + size_t len = strlen( address ) + 1; + hDBusSharedMem = CreateFileMappingA( INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, - 0, strlen( address ) + 1, _dbus_string_get_const_data(&shm_name) ); +#ifdef _WIN64 + len >> 32, len & 0xffffffff, +#else + 0, len, +#endif + _dbus_string_get_const_data(&shm_name) ); _dbus_assert( hDBusSharedMem ); shared_addr = MapViewOfFile( hDBusSharedMem, FILE_MAP_WRITE, 0, 0, 0 ); -- 1.8.4.5