From 2d6437888ef36037c65ffd3ffe33eb180c6fe0a0 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 31 Mar 2016 11:56:57 +0200 Subject: [PATCH] test: use %ld for printing uid/gid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The uid and gid fields in uv_passwd_t are of type long so use %ld for printing them. Fixes two -Wformat compiler warnings. PR-URL: https://github.com/libuv/libuv/pull/797 Reviewed-By: Saúl Ibarra Corretgé --- test/test-platform-output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-platform-output.c b/test/test-platform-output.c index b7ce070a3..2c4740550 100644 --- a/test/test-platform-output.c +++ b/test/test-platform-output.c @@ -127,8 +127,8 @@ TEST_IMPL(platform_output) { ASSERT(err == 0); printf("uv_os_get_passwd:\n"); - printf(" euid: %d\n", pwd.uid); - printf(" gid: %d\n", pwd.gid); + printf(" euid: %ld\n", pwd.uid); + printf(" gid: %ld\n", pwd.gid); printf(" username: %s\n", pwd.username); printf(" shell: %s\n", pwd.shell); printf(" home directory: %s\n", pwd.homedir);