修复编译警告

This commit is contained in:
xia-chu 2021-02-07 22:56:36 +08:00
parent a142665375
commit 1f52c727ca

View File

@ -537,7 +537,7 @@ void HttpSession::sendResponse(int code,
headerOut.emplace(kAccessControlAllowCredentials, "true"); headerOut.emplace(kAccessControlAllowCredentials, "true");
} }
if(!no_content_length && size >= 0 && size < SIZE_MAX){ if(!no_content_length && size >= 0 && (size_t)size < SIZE_MAX){
//文件长度为固定值,且不是http-flv强制设置Content-Length //文件长度为固定值,且不是http-flv强制设置Content-Length
headerOut[kContentLength] = to_string(size); headerOut[kContentLength] = to_string(size);
} }