X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=ccan%2Fstr%2Ftest%2Fcompile_fail-isblank.c;h=e14b0d7e66ac1a8e0018233c709b7274e182a468;hb=HEAD;hp=86a33503dab00fb0f3007f4c5c066030ad602c22;hpb=ecea073699c60fd5aab9e3955f59a7042d637b68;p=ccan diff --git a/ccan/str/test/compile_fail-isblank.c b/ccan/str/test/compile_fail-isblank.c index 86a33503..e14b0d7e 100644 --- a/ccan/str/test/compile_fail-isblank.c +++ b/ccan/str/test/compile_fail-isblank.c @@ -3,8 +3,9 @@ int main(int argc, char *argv[]) { + (void)argc; #ifdef FAIL -#if !HAVE_BUILTIN_TYPES_COMPATIBLE_P || !HAVE_TYPEOF +#if !HAVE_BUILTIN_TYPES_COMPATIBLE_P || !HAVE_TYPEOF || !HAVE_ISBLANK #error We need typeof to check isblank. #endif char @@ -15,9 +16,12 @@ 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 +#if HAVE_ISBLANK return isblank(c); +#else + return c; +#endif }