mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 17:00:40 +01:00
nm-sudo: fix printf format string in _handle_ping()
src/nm-sudo/nm-sudo.c: In function '_handle_ping':
src/nm-sudo/nm-sudo.c:92:79: error: format '%ld' expects argument of type 'long int', but argument 5 has type 'gint64' {aka 'long long int'} [-Werror=format=]
92 | msg = g_strdup_printf("pid=%lu, unique-name=%s, nm-name-owner=%s, since=%ld.%03d%s, pong=%s",
| ~~^
| |
| long int
| %lld
......
96 | running_msec / 1000,
| ~~~~~~~~~~~~~~~~~~~
| |
| gint64 {aka long long int}
Fixes: f137b32d31 ('sudo: introduce nm-sudo D-Bus service')
This commit is contained in:
parent
0d6adfe8e9
commit
ee5030c7bd
1 changed files with 3 additions and 2 deletions
|
|
@ -89,11 +89,12 @@ _handle_ping(GlobalData *gl, GDBusMethodInvocation *invocation, const char *arg)
|
|||
|
||||
running_msec = nm_utils_clock_gettime_msec(CLOCK_BOOTTIME) - gl->start_timestamp_msec;
|
||||
|
||||
msg = g_strdup_printf("pid=%lu, unique-name=%s, nm-name-owner=%s, since=%ld.%03d%s, pong=%s",
|
||||
msg = g_strdup_printf("pid=%lu, unique-name=%s, nm-name-owner=%s, since=%" G_GINT64_FORMAT
|
||||
".%03d%s, pong=%s",
|
||||
(unsigned long) getpid(),
|
||||
g_dbus_connection_get_unique_name(gl->dbus_connection),
|
||||
gl->name_owner ?: "(none)",
|
||||
running_msec / 1000,
|
||||
(gint64) (running_msec / 1000),
|
||||
(int) (running_msec % 1000),
|
||||
gl->no_auth_for_testing ? ", no-auth-for-testing" : "",
|
||||
arg);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue