]> git.ozlabs.org Git - ccan/blobdiff - ccan/str/test/compile_fail-isascii.c
edit_distance: calculate edit distance between strings
[ccan] / ccan / str / test / compile_fail-isascii.c
index af6e64d5d2653cc68a3f365cbdb53077a97f39d8..3946e0b3b88a288606903756c53eaaf6d267d0e8 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 isascii.
@@ -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 isascii(c);