Browse Source

Fix conversion to ‘int’ from ‘long int’ warning (#377)

Co-authored-by: Michael Tseitlin <[email protected]>
miketsts 5 years ago
parent
commit
6e473a7c5c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -1921,7 +1921,7 @@ bool read_content(Stream &strm, T &x, size_t payload_max_length, int &status,
 template <typename T>
 inline ssize_t write_headers(Stream &strm, const T &info,
                              const Headers &headers) {
-  auto write_len = 0;
+  ssize_t write_len = 0;
   for (const auto &x : info.headers) {
     auto len =
         strm.write_format("%s: %s\r\n", x.first.c_str(), x.second.c_str());