summaryrefslogtreecommitdiff
path: root/tests/test-getlogin.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-04-27 01:23:29 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-04-27 01:24:40 -0700
commit2aea2c723359d9459fd01e7b428f47656c9ce1e9 (patch)
tree9aa06adfa3feeaa5d486751ccc9f03ed33a71fb8 /tests/test-getlogin.c
parente4584a9e26ea39e2f961a700c60f3a10ec07dbb4 (diff)
downloadgnulib-2aea2c723359d9459fd01e7b428f47656c9ce1e9.tar.gz
tests: pacify GCC 5.1's stricter printf checking
* tests/test-dirname.c (main): * tests/test-getaddrinfo.c (simple): * tests/test-getlogin.c (main): * tests/test-getndelim2.c (main): * tests/test-inttostr.c (CK): * tests/test-md5.c (main): * tests/test-read-file.c (main): * tests/test-sha1.c (main): Fix mismatches between printf format and value signedness. * tests/test-inttostr.c (FMT, CAST_VAL, V_min, V_max): Remove, as CAST_VAL always returned a value of type uintmax_t.
Diffstat (limited to 'tests/test-getlogin.c')
-rw-r--r--tests/test-getlogin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-getlogin.c b/tests/test-getlogin.c
index 5da18e5f9c..3f1aeb08b8 100644
--- a/tests/test-getlogin.c
+++ b/tests/test-getlogin.c
@@ -84,9 +84,9 @@ main (void)
pwd = getpwuid (stat_buf.st_uid);
if (! pwd)
{
- fprintf (stderr, "Skipping test: no name found for uid %d\n",
- stat_buf.st_uid);
- return 77;
+ long int uid = stat_buf.st_uid;
+ fprintf (stderr, "Skipping test: no name found for uid %ld\n", uid);
+ return 77;
}
ASSERT (strcmp (pwd->pw_name, buf) == 0);