]> git.ozlabs.org Git - ccan/blobdiff - ccan/str/test/compile_fail-isxdigit.c
base64: fix for unsigned chars (e.g. ARM).
[ccan] / ccan / str / test / compile_fail-isxdigit.c
index 6a7377fd6d16862a7efad1b90a9b2bbd5c80123f..ea4d5269add225115a436092fc8184e3a45151a0 100644 (file)
@@ -3,6 +3,7 @@
 
 int main(int argc, char *argv[])
 {
+       (void)argc;
 #ifdef FAIL
 #if !HAVE_BUILTIN_TYPES_COMPATIBLE_P || !HAVE_TYPEOF
 #error We need typeof to check isxdigit.
@@ -15,8 +16,7 @@ int main(int argc, char *argv[])
 
 #ifdef FAIL
        /* Fake fail on unsigned char platforms. */
-       c = 255;
-       BUILD_ASSERT(c < 0);
+       BUILD_ASSERT((char)255 < 0);
 #endif
 
        return isxdigit(c);