mirror of
https://github.com/curl/curl.git
synced 2026-07-30 11:28:05 +03:00
typecheck-gcc: allow passing char[] as callback data
E.g. `TEST_DATA_STRING` in test 655. Cherry-picked from #22406 Closes #22409
This commit is contained in:
parent
4eb4b0d080
commit
c5ad90bf9a
1 changed files with 4 additions and 3 deletions
|
|
@ -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 *) || \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue