summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/cp/utils.c8
-rw-r--r--bin/ed/cbc.c12
-rw-r--r--bin/ed/ed.h4
3 files changed, 12 insertions, 12 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index 364f983..ab92dfc 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -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;
diff --git a/bin/ed/cbc.c b/bin/ed/cbc.c
index b0b0153..bb96022 100644
--- a/bin/ed/cbc.c
+++ b/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 */
diff --git a/bin/ed/ed.h b/bin/ed/ed.h
index aaa63f9..9233cd3 100644
--- a/bin/ed/ed.h
+++ b/bin/ed/ed.h
@@ -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);
OpenPOWER on IntegriCloud