@@ -2227,7 +2227,7 @@ inline std::string from_i_to_hex(size_t n) {
22272227
22282228inline size_t to_utf8 (int code, char *buff) {
22292229 if (code < 0x0080 ) {
2230- buff[0 ] = (code & 0x7F );
2230+ buff[0 ] = static_cast < char > (code & 0x7F );
22312231 return 1 ;
22322232 } else if (code < 0x0800 ) {
22332233 buff[0 ] = static_cast <char >(0xC0 | ((code >> 6 ) & 0x1F ));
@@ -2835,7 +2835,7 @@ class SocketStream : public Stream {
28352835 size_t read_buff_off_ = 0 ;
28362836 size_t read_buff_content_size_ = 0 ;
28372837
2838- static const size_t read_buff_size_ = 1024 * 4 ;
2838+ static const size_t read_buff_size_ = 1024l * 4 ;
28392839};
28402840
28412841#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
@@ -3804,7 +3804,7 @@ inline bool read_content_chunked(Stream &strm, T &x,
38043804
38053805 if (!line_reader.getline ()) { return false ; }
38063806
3807- if (strcmp (line_reader.ptr (), " \r\n " )) { return false ; }
3807+ if (strcmp (line_reader.ptr (), " \r\n " ) != 0 ) { return false ; }
38083808
38093809 if (!line_reader.getline ()) { return false ; }
38103810 }
@@ -3814,7 +3814,7 @@ inline bool read_content_chunked(Stream &strm, T &x,
38143814 // Trailer
38153815 if (!line_reader.getline ()) { return false ; }
38163816
3817- while (strcmp (line_reader.ptr (), " \r\n " )) {
3817+ while (strcmp (line_reader.ptr (), " \r\n " ) != 0 ) {
38183818 if (line_reader.size () > CPPHTTPLIB_HEADER_MAX_LENGTH) { return false ; }
38193819
38203820 // Exclude line terminator
0 commit comments