← Commit list

c5ad90bf9a

Viktor Szakats
Viktor Szakats
2026-07-27
SUCCESS Duration: 356s

Subject

typecheck-gcc: allow passing `char[]` as callback data

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

include/curl/typecheck-gcc.h+4 -3
@@ -608,9 +608,10 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
* == or whatsoever.
*/
-/* XXX: should evaluate to true if expr is a pointer */
+/* XXX: should evaluate to true if expr is a pointer or a char[] array */
#define curlcheck_any_ptr(expr) \
- (sizeof(expr) == sizeof(void *))
+ (sizeof(expr) == sizeof(void *) || \
+ __builtin_types_compatible_p(__typeof__(expr), char[]))
/* evaluates to true if expr is NULL */
/* XXX: must not evaluate expr, so this check is not accurate */
@@ -677,7 +678,7 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
(__builtin_types_compatible_p(__typeof__(expr), curl_off_t))
/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */
-/* XXX: also check size of an char[] array? */
+/* XXX: also check size of a char[] array? */
#define curlcheck_error_buffer(expr) \
(curlcheck_NULL(expr) || \
__builtin_types_compatible_p(__typeof__(expr), char *) || \