[clang-tidy] annotate suspicious-memory-comparison

This commit is contained in:
akallabeth 2024-09-30 19:52:19 +02:00
parent 7fdb3a68bd
commit 8a0194c105
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
2 changed files with 3 additions and 1 deletions

View File

@ -55,7 +55,7 @@ static BOOL cb_basic_struct(BasicStruct* v, void* target)
{
return (v->v1 == 1) && (v->v2 == 2);
}
// NOLINTNEXTLINE(bugprone-suspicious-memory-comparison,cert-exp42-c,cert-flp37-c)
POD_ARRAYS_IMPL(BasicStruct, basicstruct)
int TestPodArrays(int argc, char* argv[])

View File

@ -750,6 +750,7 @@ int _comm_ioctl_tcsetattr(int fd, int optional_actions, const struct termios* te
return result;
}
// NOLINTNEXTLINE(bugprone-suspicious-memory-comparison,cert-exp42-c,cert-flp37-c)
if (memcmp(&currentState, termios_p, sizeof(struct termios)) != 0)
{
CommLog_Print(WLOG_DEBUG,
@ -767,6 +768,7 @@ int _comm_ioctl_tcsetattr(int fd, int optional_actions, const struct termios* te
return result;
}
// NOLINTNEXTLINE(bugprone-suspicious-memory-comparison,cert-exp42-c,cert-flp37-c)
if (memcmp(&currentState, termios_p, sizeof(struct termios)) != 0)
{
CommLog_Print(WLOG_WARN,