Use %jd in format string and cast argument to intmax_t instead of using
%qd to print struct stat.st_size. Remove WARNS=0 and WFORMAT=0 from Makefile. Tested on: alpha, sparc64, i386
This commit is contained in:
parent
5b94264c20
commit
8b9f20c622
@ -4,8 +4,6 @@
|
||||
PROG= rcp
|
||||
SRCS= rcp.c util.c
|
||||
CFLAGS+=-DBINDIR=${BINDIR}
|
||||
WARNS= 0
|
||||
WFORMAT=0
|
||||
|
||||
.if defined(MAKE_KERBEROS4) && !defined(NO_OPENSSL) && !defined(NOCRYPT)
|
||||
SRCS+= krcmd.c kcmd.c rcmd_util.c
|
||||
|
@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <paths.h>
|
||||
#include <pwd.h>
|
||||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -489,8 +490,8 @@ syserr: run_err("%s: %s", name, strerror(errno));
|
||||
goto next;
|
||||
}
|
||||
#define MODEMASK (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
|
||||
(void)snprintf(buf, sizeof(buf), "C%04o %qd %s\n",
|
||||
stb.st_mode & MODEMASK, stb.st_size, last);
|
||||
(void)snprintf(buf, sizeof(buf), "C%04o %jd %s\n",
|
||||
stb.st_mode & MODEMASK, (intmax_t)stb.st_size, last);
|
||||
(void)write(rem, buf, strlen(buf));
|
||||
if (response() < 0)
|
||||
goto next;
|
||||
|
Loading…
Reference in New Issue
Block a user