Reported by clang.
* tests/mknod.c (main): Cast printf argument for %#03ho format to short.
* tests/mknodat.c (main): Likewise.
* tests/net-sockaddr.c (main): Cast printf argument for %hu format
to short.
* tests/semop.c (main): Likewise.
rc = call_mknod(mode, dev);
printf("mknod(\"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho"
", makedev(%u, %u)) = %ld %s (%m)\n",
- sample, mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX),
+ sample, (short) (mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX)),
major((unsigned) dev), minor((unsigned) dev),
rc, errno2name());
rc = call_mknodat(mode, dev);
printf("mknodat(-1, \"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho"
", makedev(%u, %u)) = %ld %s (%m)\n",
- sample, mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX),
+ sample, (short) (mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX)),
major((unsigned) dev), minor((unsigned) dev),
rc, errno2name());
#ifdef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE
", l2_bdaddr_type=0xce /* BDADDR_??? */"
#endif
- "}, %u) = %d EBADF (%m)\n", h_psm - 0x1001,
+ "}, %u) = %d EBADF (%m)\n",
+ (short) (h_psm - 0x1001),
c_l2.l2_bdaddr.b[0], c_l2.l2_bdaddr.b[1],
c_l2.l2_bdaddr.b[2], c_l2.l2_bdaddr.b[3],
c_l2.l2_bdaddr.b[4], c_l2.l2_bdaddr.b[5],
- h_cid - 0x40, len, ret);
+ (short) (h_cid - 0x40), len, ret);
c_l2.l2_psm = htobs(1);
c_l2.l2_cid = htobs(1);
bogus_semid, sem_b2->sem_num, sem_b2->sem_op,
sem_b2->sem_flg & SEM_UNDO ? "SEM_UNDO|" : "",
sem_b2->sem_flg & IPC_NOWAIT ? "IPC_NOWAIT|" : "",
- sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT),
+ (short) (sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT)),
sem_b2 + 1, 2, sprintrc(rc));
if (semop(id, sem_b, 1))
bogus_semid, sem_b2->sem_num, sem_b2->sem_op,
sem_b2->sem_flg & SEM_UNDO ? "SEM_UNDO|" : "",
sem_b2->sem_flg & IPC_NOWAIT ? "IPC_NOWAIT|" : "",
- sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT),
+ (short) (sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT)),
sem_b2 + 1, 2,
(long long) ts->tv_sec, zero_extend_signed_to_ull(ts->tv_nsec),
sprintrc(rc));