aboutgitcodebugslistschat
path: root/test/nsholder.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-09-28 14:33:22 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-09-29 12:22:10 +0200
commitdf74984c520cb7a5141e7a46c5c1c71bf31355b7 (patch)
treeb7338c0d81fa5c7796915093df7490acd80d8786 /test/nsholder.c
parenta668d87e7e1f0eae424212bfde31d7bbf464f8b1 (diff)
downloadpasst-df74984c520cb7a5141e7a46c5c1c71bf31355b7.tar
passt-df74984c520cb7a5141e7a46c5c1c71bf31355b7.tar.gz
passt-df74984c520cb7a5141e7a46c5c1c71bf31355b7.tar.bz2
passt-df74984c520cb7a5141e7a46c5c1c71bf31355b7.tar.lz
passt-df74984c520cb7a5141e7a46c5c1c71bf31355b7.tar.xz
passt-df74984c520cb7a5141e7a46c5c1c71bf31355b7.tar.zst
passt-df74984c520cb7a5141e7a46c5c1c71bf31355b7.zip
Stricter checking for nsholder.c
Add the -Wextra -pedantic and -std=c99 flags when compiling the nsholder test helper to get extra compiler checks, like we already use for the main source code. While we're there, fix some %d (signed) printf descriptors being used for unsigned values (uid_t and gid_t). Pointed out by cppcheck. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/nsholder.c')
-rw-r--r--test/nsholder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/nsholder.c b/test/nsholder.c
index aac901b..010a051 100644
--- a/test/nsholder.c
+++ b/test/nsholder.c
@@ -53,7 +53,7 @@ static void hold(int fd, const struct sockaddr_un *addr)
if (rc < 0)
die("listen(): %s\n", strerror(errno));
- printf("nsholder: local PID=%d local UID=%d local GID=%d\n",
+ printf("nsholder: local PID=%d local UID=%u local GID=%u\n",
getpid(), getuid(), getgid());
do {
int afd = accept(fd, NULL, NULL);