[warnings] annotate cert-err34-c
This commit is contained in:
parent
f6eb6ad4d7
commit
fe8555a4fd
@ -65,6 +65,8 @@ static bool is_mac_os_sonoma_or_later(void)
|
||||
int major = 0;
|
||||
int minor = 0;
|
||||
int patch = 0;
|
||||
|
||||
// NOLINTNEXTLINE(cert-err34-c)
|
||||
const int rc = sscanf(str, "%d.%d.%d", &major, &minor, &patch);
|
||||
if (rc != 3)
|
||||
{
|
||||
|
@ -1122,6 +1122,7 @@ static BOOL read_cmd(FILE* fp, RDPGFX_SURFACE_COMMAND* cmd, UINT32* frameId)
|
||||
WINPR_ASSERT(cmd);
|
||||
WINPR_ASSERT(frameId);
|
||||
|
||||
// NOLINTBEGIN(cert-err34-c)
|
||||
if (1 != fscanf(fp, "frameid: %" PRIu32 "\n", frameId))
|
||||
return FALSE;
|
||||
if (1 != fscanf(fp, "surfaceId: %" PRIu32 "\n", &cmd->surfaceId))
|
||||
@ -1146,6 +1147,7 @@ static BOOL read_cmd(FILE* fp, RDPGFX_SURFACE_COMMAND* cmd, UINT32* frameId)
|
||||
return FALSE;
|
||||
if (1 != fscanf(fp, "length: %" PRIu32 "\n", &cmd->length))
|
||||
return FALSE;
|
||||
// NOLINTEND(cert-err34-c)
|
||||
|
||||
char* data = NULL;
|
||||
|
||||
|
@ -896,10 +896,11 @@ int TestPrimitivesYUV(int argc, char* argv[])
|
||||
|
||||
for (UINT32 x = 0; x < 5; x++)
|
||||
{
|
||||
prim_size_t roi;
|
||||
prim_size_t roi = { 0 };
|
||||
|
||||
if (argc > 1)
|
||||
{
|
||||
// NOLINTNEXTLINE(cert-err34-c)
|
||||
int crc = sscanf(argv[1], "%" PRIu32 "x%" PRIu32, &roi.width, &roi.height);
|
||||
|
||||
if (crc != 2)
|
||||
|
@ -221,6 +221,7 @@ BOOL freerdp_http_request(const char* url, const char* body, long* status_code,
|
||||
goto out;
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(cert-err34-c)
|
||||
if (sscanf(buffer, "HTTP/1.1 %li %*[^\r\n]\r\n", status_code) < 1)
|
||||
{
|
||||
WLog_Print(log, WLOG_ERROR, "invalid HTTP status line");
|
||||
|
Loading…
Reference in New Issue
Block a user