tests: fix callback signatures to please UndefinedBehaviorSanitizer

Make test applications use the correct prototypes for callbacks.

Closes #15289
This commit is contained in:
Daniel Stenberg 2024-10-14 13:01:19 +02:00
parent eed3c8f4b7
commit 8403e5a701
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
17 changed files with 59 additions and 58 deletions

View file

@ -167,7 +167,7 @@ struct handle
CURL *h;
};
static size_t cb(void *data, size_t size, size_t nmemb, void *clientp)
static size_t cb(char *data, size_t size, size_t nmemb, void *clientp)
{
size_t realsize = size * nmemb;
struct handle *handle = (struct handle *) clientp;

View file

@ -159,10 +159,10 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb,
}
static int progress_callback(void *clientp,
double dltotal,
double dlnow,
double ultotal,
double ulnow)
curl_off_t dltotal,
curl_off_t dlnow,
curl_off_t ultotal,
curl_off_t ulnow)
{
(void)dltotal;
(void)dlnow;