summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/crc32.c2
-rw-r--r--libbb/getopt32.c4
-rw-r--r--libbb/pw_encrypt.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/libbb/crc32.c b/libbb/crc32.c
index ac9836c..0711ca8 100644
--- a/libbb/crc32.c
+++ b/libbb/crc32.c
@@ -24,7 +24,7 @@ uint32_t* FAST_FUNC crc32_filltable(uint32_t *crc_table, int endian)
{
uint32_t polynomial = endian ? 0x04c11db7 : 0xedb88320;
uint32_t c;
- int i, j;
+ unsigned i, j;
if (!crc_table)
crc_table = xmalloc(256 * sizeof(uint32_t));
diff --git a/libbb/getopt32.c b/libbb/getopt32.c
index 15b6efc..497fc01 100644
--- a/libbb/getopt32.c
+++ b/libbb/getopt32.c
@@ -404,7 +404,7 @@ getopt32(char **argv, const char *applet_opts, ...)
if (c >= 32)
break;
on_off->opt_char = *s;
- on_off->switch_on = (1 << c);
+ on_off->switch_on = (1U << c);
if (*++s == ':') {
on_off->optarg = va_arg(p, void **);
if (s[1] == '+' || s[1] == '*') {
@@ -454,7 +454,7 @@ getopt32(char **argv, const char *applet_opts, ...)
if (c >= 32)
break;
on_off->opt_char = l_o->val;
- on_off->switch_on = (1 << c);
+ on_off->switch_on = (1U << c);
if (l_o->has_arg != no_argument)
on_off->optarg = va_arg(p, void **);
c++;
diff --git a/libbb/pw_encrypt.c b/libbb/pw_encrypt.c
index 4cdc2de..fe06a8f 100644
--- a/libbb/pw_encrypt.c
+++ b/libbb/pw_encrypt.c
@@ -30,7 +30,7 @@ static int i64c(int i)
int FAST_FUNC crypt_make_salt(char *p, int cnt /*, int x */)
{
/* was: x += ... */
- int x = getpid() + monotonic_us();
+ unsigned x = getpid() + monotonic_us();
do {
/* x = (x*1664525 + 1013904223) % 2^32 generator is lame
* (low-order bit is not "random", etc...),