diff --git a/include/curl/curl.h b/include/curl/curl.h index 4e2cf9ada5..cb4e523c38 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -3317,8 +3317,9 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle, #include "mprintf.h" /* the typechecker does not work in C++ (yet) */ -#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ - ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ +#if ((defined(__GNUC__) && defined(__GNUC_MINOR__) && \ + ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \ + (defined(__clang__) && __clang_major__ >= 14)) && \ !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) #include "typecheck-gcc.h" #else diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c index 29c4119cd7..c20bbd4ea3 100644 --- a/src/tool_urlglob.c +++ b/src/tool_urlglob.c @@ -68,8 +68,9 @@ static int multiply(curl_off_t *amount, curl_off_t with) sum = 0; } else { -#if defined(__GNUC__) && \ - ((__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 1))) +#if (defined(__GNUC__) && \ + ((__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 1)))) || \ + (defined(__clang__) && __clang_major__ >= 8) if(__builtin_mul_overflow(*amount, with, &sum)) return 1; #else diff --git a/tests/libtest/lib1912.c b/tests/libtest/lib1912.c index db6c3d1e68..e74808c3c0 100644 --- a/tests/libtest/lib1912.c +++ b/tests/libtest/lib1912.c @@ -27,7 +27,7 @@ #define print_err(name, exp) \ curl_mfprintf(stderr, "Type mismatch for CURLOPT_%s (expected %s)\n", \ - name, exp); + name, exp) static CURLcode test_lib1912(char *URL) { diff --git a/tests/libtest/lib2032.c b/tests/libtest/lib2032.c index a998c72230..993626bb35 100644 --- a/tests/libtest/lib2032.c +++ b/tests/libtest/lib2032.c @@ -142,7 +142,7 @@ static CURLcode test_lib2032(char *URL) /* libntlmconnect */ "testuser:testpass"); easy_setopt(ntlm_easy[num_handles], CURLOPT_WRITEFUNCTION, callback); easy_setopt(ntlm_easy[num_handles], CURLOPT_WRITEDATA, - ntlm_easy + num_handles); + (void *)(ntlm_easy + num_handles)); easy_setopt(ntlm_easy[num_handles], CURLOPT_HEADER, 1L); multi_add_handle(multi, ntlm_easy[num_handles]);