test: use %ld for printing uid/gid

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é <saghul@gmail.com>
This commit is contained in:
Ben Noordhuis 2016-03-31 11:56:57 +02:00
parent 1c0281e3e2
commit 2d6437888e

View File

@ -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);