2121#include < curl/curl.h>
2222#include < sys/stat.h>
2323#include < cassert>
24+ #include < cstddef>
2425#include < fstream>
2526#include < map>
2627#include < random>
@@ -93,7 +94,7 @@ static bool file_exists(const string &path) {
9394 return (stat (path.c_str (), &sb) == 0 );
9495}
9596
96- static std::pair<CURLcode, long > send_file_to_webserver (bool add_second_file, bool append_parameters) {
97+ static std::pair<CURLcode, int32_t > send_file_to_webserver (bool add_second_file, bool append_parameters) {
9798 curl_global_init (CURL_GLOBAL_ALL );
9899
99100 CURL *curl = curl_easy_init ();
@@ -119,15 +120,15 @@ static std::pair<CURLcode, long> send_file_to_webserver(bool add_second_file, bo
119120 curl_easy_setopt (curl, CURLOPT_MIMEPOST , form);
120121
121122 res = curl_easy_perform (curl);
122- long http_code = 0 ;
123+ long http_code = 0 ; // NOLINT [runtime/int]
123124 curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE , &http_code);
124125
125126 curl_easy_cleanup (curl);
126127 curl_mime_free (form);
127128 return {res, http_code};
128129}
129130
130- static std::pair<CURLcode, long > send_large_file (string* content, std::string args = " " ) {
131+ static std::pair<CURLcode, int32_t > send_large_file (string* content, std::string args = " " ) {
131132 // Generate a large (100K) file of random bytes. Upload the file with
132133 // a curl request, then delete the file. The default chunk size of MHD
133134 // appears to be around 16K, so 100K should be enough to trigger the
@@ -158,7 +159,7 @@ static std::pair<CURLcode, long> send_large_file(string* content, std::string ar
158159 curl_easy_setopt (curl, CURLOPT_MIMEPOST , form);
159160
160161 res = curl_easy_perform (curl);
161- long http_code = 0 ;
162+ long http_code = 0 ; // NOLINT [runtime/int]
162163 curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE , &http_code);
163164
164165 curl_easy_cleanup (curl);
@@ -167,7 +168,7 @@ static std::pair<CURLcode, long> send_large_file(string* content, std::string ar
167168 return {res, http_code};
168169}
169170
170- static std::tuple<bool , CURLcode, long > send_file_via_put () {
171+ static std::tuple<bool , CURLcode, int32_t > send_file_via_put () {
171172 curl_global_init (CURL_GLOBAL_ALL );
172173
173174 CURL *curl;
@@ -196,7 +197,7 @@ static std::tuple<bool, CURLcode, long> send_file_via_put() {
196197 curl_easy_setopt (curl, CURLOPT_INFILESIZE_LARGE , (curl_off_t ) file_info.st_size );
197198
198199 res = curl_easy_perform (curl);
199- long http_code = 0 ;
200+ long http_code = 0 ; // NOLINT [runtime/int]
200201 curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE , &http_code);
201202
202203 curl_easy_cleanup (curl);
0 commit comments