summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko2008-05-09 18:07:15 +0000
committerDenis Vlasenko2008-05-09 18:07:15 +0000
commit023dc6798e05373bf33d64221bbe6a7265734c34 (patch)
treec111bcbb60f73790b29f7dd4f030f8c1e87b29a8
parent98636eb08c5ecc216e18970e11f7021206ac9b04 (diff)
downloadbusybox-023dc6798e05373bf33d64221bbe6a7265734c34.zip
busybox-023dc6798e05373bf33d64221bbe6a7265734c34.tar.gz
fix warnings about pointer signedness
-rw-r--r--coreutils/md5_sha1_sum.c2
-rw-r--r--coreutils/tr.c4
-rw-r--r--miscutils/less.c2
-rw-r--r--networking/arp.c2
-rw-r--r--networking/sendmail.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 2e1c964..c816194 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -21,7 +21,7 @@ static unsigned char *hash_bin_to_hex(unsigned char *hash_value,
/* xzalloc zero-terminates */
char *hex_value = xzalloc((hash_length * 2) + 1);
bin2hex(hex_value, (char*)hash_value, hash_length);
- return hex_value;
+ return (unsigned char *)hex_value;
}
static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
diff --git a/coreutils/tr.c b/coreutils/tr.c
index d0af63a..0d32849 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -208,8 +208,8 @@ int tr_main(int argc ATTRIBUTE_UNUSED, char **argv)
if (*argv) {
if (argv[0][0] == '\0')
bb_error_msg_and_die("STRING2 cannot be empty");
- output_length = expand(*argv, output);
- map(vector, tr_buf, input_length, output, output_length);
+ output_length = expand(*argv, (char *)output);
+ map(vector, (unsigned char *)tr_buf, input_length, output, output_length);
}
for (i = 0; i < input_length; i++)
invec[(unsigned char)tr_buf[i]] = TRUE;
diff --git a/miscutils/less.c b/miscutils/less.c
index 37ec5d9..065bf6f 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -731,7 +731,7 @@ static int less_getch(int pos)
again:
less_gets_pos = pos;
memset(input, 0, sizeof(input));
- getch_nowait(input, sizeof(input));
+ getch_nowait((char *)input, sizeof(input));
less_gets_pos = -1;
/* Detect escape sequences (i.e. arrow keys) and handle
diff --git a/networking/arp.c b/networking/arp.c
index c9b9d1d..f42e09f 100644
--- a/networking/arp.c
+++ b/networking/arp.c
@@ -200,7 +200,7 @@ static void arp_getdevhw(char *ifname, struct sockaddr *sa,
}
bb_error_msg("device '%s' has HW address %s '%s'",
ifname, xhw->name,
- xhw->print((char *) &ifr.ifr_hwaddr.sa_data));
+ xhw->print((unsigned char *) &ifr.ifr_hwaddr.sa_data));
}
}
diff --git a/networking/sendmail.c b/networking/sendmail.c
index 242bb0e..f37d97f 100644
--- a/networking/sendmail.c
+++ b/networking/sendmail.c
@@ -533,7 +533,7 @@ int sendgetmail_main(int argc ATTRIBUTE_UNUSED, char **argv)
// so we reuse md5 space instead of xzalloc(16*2+1)
#define md5_hex ((uint8_t *)&md5)
// uint8_t *md5_hex = (uint8_t *)&md5;
- *bin2hex(md5_hex, s, 16) = '\0';
+ *bin2hex((char *)md5_hex, s, 16) = '\0';
// APOP
s = xasprintf("%s %s", opt_user, md5_hex);
#undef md5_hex