From: Graham Percival Date: Tue, 31 Dec 2024 03:42:04 +0000 (-0800) Subject: Fix compiler nitpicks (#2470) X-Git-Tag: v3.8.0~79 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=25c3d9afeada3241cd966f65bb6a28ae9b47a832;p=thirdparty%2Flibarchive.git Fix compiler nitpicks (#2470) --- diff --git a/cpio/test/test_option_c.c b/cpio/test/test_option_c.c index 211f2142d..2414a4658 100644 --- a/cpio/test/test_option_c.c +++ b/cpio/test/test_option_c.c @@ -18,7 +18,7 @@ is_octal(const char *p, size_t l) return (1); } -static long long int +static unsigned long long int from_octal(const char *p, size_t l) { long long int r = 0; @@ -133,7 +133,7 @@ DEFINE_TEST(test_option_c) assert(is_octal(e, 76)); /* Entire header is octal digits. */ assertEqualMem(e + 0, "070707", 6); /* Magic */ assertEqualInt(dev, from_octal(e + 6, 6)); /* dev */ - assert(ino != from_octal(e + 12, 6)); /* ino */ + assert(ino != (int)from_octal(e + 12, 6)); /* ino */ #if !defined(_WIN32) || defined(__CYGWIN__) /* On Windows, symbolic link and group members bits and * others bits do not work. */ @@ -163,7 +163,7 @@ DEFINE_TEST(test_option_c) assertEqualInt(dev, from_octal(e + 6, 6)); /* Ino must be different from first entry. */ assert(is_octal(e + 12, 6)); /* ino */ - assert(ino != from_octal(e + 12, 6)); + assert(ino != (int)from_octal(e + 12, 6)); #if defined(_WIN32) && !defined(__CYGWIN__) /* Group members bits and others bits do not work. */ assertEqualMem(e + 18, "040777", 6); /* Mode */