Fix some easy WARNS.
This commit is contained in:
parent
9f82c1d3b1
commit
13fcef50d0
@ -140,10 +140,10 @@ copy_file(FTSENT *entp, int dne)
|
||||
for (bufp = p, wresid = fs->st_size; ;
|
||||
bufp += wcount, wresid -= (size_t)wcount) {
|
||||
wcount = write(to_fd, bufp, wresid);
|
||||
if (wcount >= wresid || wcount <= 0)
|
||||
if (wcount >= (ssize_t)wresid || wcount <= 0)
|
||||
break;
|
||||
}
|
||||
if (wcount != wresid) {
|
||||
if (wcount != (ssize_t)wresid) {
|
||||
warn("%s", to.p_path);
|
||||
rval = 1;
|
||||
}
|
||||
@ -160,10 +160,10 @@ copy_file(FTSENT *entp, int dne)
|
||||
for (bufp = buf, wresid = rcount; ;
|
||||
bufp += wcount, wresid -= wcount) {
|
||||
wcount = write(to_fd, bufp, wresid);
|
||||
if (wcount >= wresid || wcount <= 0)
|
||||
if (wcount >= (ssize_t)wresid || wcount <= 0)
|
||||
break;
|
||||
}
|
||||
if (wcount != wresid) {
|
||||
if (wcount != (ssize_t)wresid) {
|
||||
warn("%s", to.p_path);
|
||||
rval = 1;
|
||||
break;
|
||||
|
12
bin/ed/cbc.c
12
bin/ed/cbc.c
@ -56,11 +56,11 @@ __FBSDID("$FreeBSD$");
|
||||
#define MEMZERO(dest,len) memset((dest), 0, (len))
|
||||
|
||||
/* Hide the calls to the primitive encryption routines. */
|
||||
#define DES_KEY(buf) \
|
||||
if (des_setkey(buf)) \
|
||||
#define DES_KEY(buf) \
|
||||
if (des_setkey(buf)) \
|
||||
des_error("des_setkey");
|
||||
#define DES_XFORM(buf) \
|
||||
if (des_cipher(buf, buf, 0L, (inverse ? -1 : 1))) \
|
||||
#define DES_XFORM(buf) \
|
||||
if (des_cipher((char *)buf, (char *)buf, 0L, inverse ? -1 : 1)) \
|
||||
des_error("des_cipher");
|
||||
|
||||
/*
|
||||
@ -332,7 +332,7 @@ set_des_key(Desbuf buf) /* key block */
|
||||
* This encrypts using the Cipher Block Chaining mode of DES
|
||||
*/
|
||||
int
|
||||
cbc_encode(char *msgbuf, int n, FILE *fp)
|
||||
cbc_encode(unsigned char *msgbuf, int n, FILE *fp)
|
||||
{
|
||||
int inverse = 0; /* 0 to encrypt, 1 to decrypt */
|
||||
|
||||
@ -370,7 +370,7 @@ cbc_encode(char *msgbuf, int n, FILE *fp)
|
||||
* fp input file descriptor
|
||||
*/
|
||||
int
|
||||
cbc_decode(char *msgbuf, FILE *fp)
|
||||
cbc_decode(unsigned char *msgbuf, FILE *fp)
|
||||
{
|
||||
Desbuf tbuf; /* temp buffer for initialization vector */
|
||||
int n; /* number of bytes actually read */
|
||||
|
@ -180,8 +180,8 @@ void add_line_node(line_t *);
|
||||
int append_lines(long);
|
||||
int apply_subst_template(const char *, regmatch_t *, int, int);
|
||||
int build_active_list(int);
|
||||
int cbc_decode(char *, FILE *);
|
||||
int cbc_encode(char *, int, FILE *);
|
||||
int cbc_decode(unsigned char *, FILE *);
|
||||
int cbc_encode(unsigned char *, int, FILE *);
|
||||
int check_addr_range(long, long);
|
||||
void clear_active_list(void);
|
||||
void clear_undo_stack(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user