Promote uid_t value to long and print with %ld to prevent compile
authorDavid Levine <levinedl@acm.org>
Wed, 14 Mar 2012 00:56:06 +0000 (19:56 -0500)
committerDavid Levine <levinedl@acm.org>
Wed, 14 Mar 2012 00:56:06 +0000 (19:56 -0500)
warning on platforms, such as Cygwin, where it is a long.

test/getfullname.c

index 3dc221e..d8ff101 100644 (file)
@@ -28,7 +28,7 @@ main(int argc, char *argv[])
 
        if (! pwd) {
                fprintf(stderr, "Unable to retrieve user info for "
-                       "userid %d\n", getuid());
+                       "userid %ld\n", (long) getuid());
                exit(1);
        }