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

Merge pull request #17909 from fabian18/drivers_cpuid_disable_gcc_builtin_warnings

drivers/periph_common/cpuid: disable false positive warnings
This commit is contained in:
fabian18 2022-04-10 20:13:26 +02:00 committed by GitHub
commit ad345eea4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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