diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache index e5912de027a9..0d1bf5b06593 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache @@ -236,7 +236,7 @@ char *assembleHeaderField(char *key, char *value) { void postData(CURL *handle, const char *bodyParameters) { curl_easy_setopt(handle, CURLOPT_POSTFIELDS, bodyParameters); curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE_LARGE, - strlen(bodyParameters)); + (curl_off_t)strlen(bodyParameters)); } int lengthOfKeyPair(keyValuePair_t *keyPair) { diff --git a/samples/client/petstore/c/src/apiClient.c b/samples/client/petstore/c/src/apiClient.c index 89d6301a98d4..4f8cc3ca0561 100644 --- a/samples/client/petstore/c/src/apiClient.c +++ b/samples/client/petstore/c/src/apiClient.c @@ -190,7 +190,7 @@ char *assembleHeaderField(char *key, char *value) { void postData(CURL *handle, const char *bodyParameters) { curl_easy_setopt(handle, CURLOPT_POSTFIELDS, bodyParameters); curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE_LARGE, - strlen(bodyParameters)); + (curl_off_t)strlen(bodyParameters)); } int lengthOfKeyPair(keyValuePair_t *keyPair) {