Fix warnings, fix a typo in a testcase description, bump WARNS to 3
- Remove argc/argv (-Wunused) - Cast len in comparison to size_t (-Wsign-compare) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
16be9f54e7
commit
2084db1777
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281354
@ -2,6 +2,6 @@
|
||||
|
||||
PROG= unix_passfd
|
||||
MAN=
|
||||
WARNS?= 2
|
||||
WARNS?= 3
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -139,7 +139,7 @@ sendfd_payload(const char *test, int sockfd, int sendfd,
|
||||
len = sendmsg(sockfd, &msghdr, 0);
|
||||
if (len < 0)
|
||||
err(-1, "%s: sendmsg", test);
|
||||
if (len != paylen)
|
||||
if ((size_t)len != paylen)
|
||||
errx(-1, "%s: sendmsg: %zd bytes sent", test, len);
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ recvfd_payload(const char *test, int sockfd, int *recvfd,
|
||||
len = recvmsg(sockfd, &msghdr, 0);
|
||||
if (len < 0)
|
||||
err(-1, "%s: recvmsg", test);
|
||||
if (len != buflen)
|
||||
if ((size_t)len != buflen)
|
||||
errx(-1, "%s: recvmsg: %zd bytes received", test, len);
|
||||
|
||||
cmsghdr = CMSG_FIRSTHDR(&msghdr);
|
||||
@ -205,7 +205,7 @@ recvfd(const char *test, int sockfd, int *recvfd)
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
main(void)
|
||||
{
|
||||
struct stat putfd_1_stat, putfd_2_stat, getfd_1_stat, getfd_2_stat;
|
||||
int fd[2], putfd_1, putfd_2, getfd_1, getfd_2;
|
||||
@ -354,7 +354,7 @@ main(int argc, char *argv[])
|
||||
* payload. Payload + SCM_RIGHTS + LOCAL_CREDS hit socket buffer
|
||||
* limit, and receiver receives truncated data.
|
||||
*/
|
||||
test = "test8-rigths+creds+payload";
|
||||
test = "test8-rights+creds+payload";
|
||||
printf("beginning %s\n", test);
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user