1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Fix build warnings.

This commit is contained in:
winlin 2022-08-09 07:56:01 +08:00
parent f44b694a17
commit f9e8065b51
3 changed files with 4 additions and 5 deletions

View file

@ -49,7 +49,7 @@ public:
{
static char buf[4096] = {0};
int nbytes = vsnprintf(buf, sizeof(buf), fmt, vl);
if (nbytes > 0 && nbytes < sizeof(buf)) {
if (nbytes > 0 && nbytes < (int)sizeof(buf)) {
// Srs log is always start with new line, replcae '\n' to '\0', make log easy to read.
if (buf[nbytes - 1] == '\n') {
buf[nbytes - 1] = '\0';