1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/periph_common/cpuid: disable false positive warnings

The warnings appeared after the -fno-builtin compiler flag was removed (#17898),
but the code is looking fine and tests/periph_cpuid shows correct results.
This commit is contained in:
Fabian Hüßler 2022-04-10 11:57:00 +02:00
parent c89f6bf115
commit 045d88df7c

View File

@ -31,6 +31,12 @@
#ifdef CPUID_ADDR
void cpuid_get(void *id)
{
/* gcc 11.2.0 builtin bounds checking raises the following false positive warnings */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas" /* silence the CI due to unknown -Wstringop-overread */
#pragma GCC diagnostic ignored "-Warray-bounds"
#pragma GCC diagnostic ignored "-Wstringop-overread"
memcpy(id, (void *)CPUID_ADDR, CPUID_LEN);
#pragma GCC diagnostic pop
}
#endif