diff options
author | Rob Landley <rob@landley.net> | 2019-11-13 21:26:26 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-11-13 21:26:26 -0600 |
commit | b213f91a0031da91eb6d3b86c7e724a0f7725d3e (patch) | |
tree | a9abe0dd009bb44ca2e7ada461cf239c4373acb2 /toys | |
parent | 25c3e691140f48e971bdcc558cdf9acb7576598a (diff) | |
download | toybox-b213f91a0031da91eb6d3b86c7e724a0f7725d3e.tar.gz |
Pedantic constant annotations to shut up older toolchains.
Diffstat (limited to 'toys')
-rw-r--r-- | toys/net/sntp.c | 2 | ||||
-rw-r--r-- | toys/posix/file.c | 2 | ||||
-rw-r--r-- | toys/posix/tar.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/toys/net/sntp.c b/toys/net/sntp.c index 15e74440..ab6a6031 100644 --- a/toys/net/sntp.c +++ b/toys/net/sntp.c @@ -39,7 +39,7 @@ GLOBALS( ) // Seconds from 1900 to 1970, including appropriate leap days -#define SEVENTIES 2208988800L +#define SEVENTIES 2208988800UL // Get time and return ntptime (saving timespec in pointer if not null) // NTP time is high 32 bits = seconds since 1970 (blame RFC 868), low 32 bits diff --git a/toys/posix/file.c b/toys/posix/file.c index 063397ce..5d6eef12 100644 --- a/toys/posix/file.c +++ b/toys/posix/file.c @@ -284,7 +284,7 @@ static void do_regular_file(int fd, char *name) xputc('\n'); } else if (len>4 && strstart(&s, "BZh") && isdigit(*s)) xprintf("bzip2 compressed data, block size = %c00k\n", *s); - else if (len > 31 && peek_be(s, 7) == 0xfd377a585a0000) + else if (len > 31 && peek_be(s, 7) == 0xfd377a585a0000UL) xputs("xz compressed data"); else if (len>10 && strstart(&s, "\x1f\x8b")) xputs("gzip compressed data"); else if (len>32 && !memcmp(s+1, "\xfa\xed\xfe", 3)) { diff --git a/toys/posix/tar.c b/toys/posix/tar.c index ff129819..1e662589 100644 --- a/toys/posix/tar.c +++ b/toys/posix/tar.c @@ -848,7 +848,7 @@ void tar_main(void) // detect gzip and bzip signatures if (SWAP_BE16(*(short *)hdr)==0x1f8b) toys.optflags |= FLAG_z; else if (!memcmp(hdr, "BZh", 3)) toys.optflags |= FLAG_j; - else if (peek_be(hdr, 7) == 0xfd377a585a0000) toys.optflags |= FLAG_J; + else if (peek_be(hdr, 7) == 0xfd377a585a0000UL) toys.optflags |= FLAG_J; else error_exit("Not tar"); // if we can seek back we don't need to loop and copy data |