From: Ralf Habacker Date: Tue, 27 Aug 2013 15:32:56 +0000 (+0200) Subject: Fixed gcc 4.8.1 -Wformat warnings on windows. X-Git-Tag: dbus-1.7.6~82 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1bc0164589193f8b5997580f60a5874065357fe;p=thirdparty%2Fdbus.git Fixed gcc 4.8.1 -Wformat warnings on windows. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67072 Reviewed-by: Simon McVittie --- diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 38758bd48..efeb2a616 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -165,7 +165,7 @@ get_pid_from_extended_tcp_table(int peer_port) } else { - _dbus_verbose ("unexpected error returned from GetExtendedTcpTable %d\n", errorCode); + _dbus_win_warn_win_error ("unexpected error returned from GetExtendedTcpTable", errorCode); return 0; } @@ -188,7 +188,7 @@ get_pid_from_extended_tcp_table(int peer_port) } dbus_free (tcp_table); - _dbus_verbose ("got pid %d\n", (int)result); + _dbus_verbose ("got pid %lu\n", result); return result; } @@ -236,7 +236,7 @@ get_pid_from_tcp_ex_table(int peer_port) } HeapFree (GetProcessHeap(), 0, tcp_table); - _dbus_verbose ("got pid %d\n", (int)result); + _dbus_verbose ("got pid %lu\n", result); return result; } @@ -3840,7 +3840,7 @@ _dbus_win_set_error_from_win_error (DBusError *error, void _dbus_win_warn_win_error (const char *message, - int code) + unsigned long code) { DBusError error; diff --git a/dbus/dbus-sysdeps-win.h b/dbus/dbus-sysdeps-win.h index 5e7f1e461..7cb1b6ffa 100644 --- a/dbus/dbus-sysdeps-win.h +++ b/dbus/dbus-sysdeps-win.h @@ -44,7 +44,7 @@ const char* _dbus_win_error_from_last_error (void); void _dbus_win_startup_winsock (void); void _dbus_win_warn_win_error (const char *message, - int code); + unsigned long code); char * _dbus_win_error_string (int error_number); void _dbus_win_free_error_string (char *string);