The kbuild test robot reported this warning:
arch/x86/kernel/cpu/mce/dev-mcelog.c: In function 'dev_mcelog_init_device':
arch/x86/kernel/cpu/mce/dev-mcelog.c:346:2: warning: 'strncpy' output \
truncated before terminating nul copying 12 bytes from a string of the \
same length [-Wstringop-truncation]
This is accurate, but I don't care that the trailing NUL character isn't
copied. The string being copied is just a magic number signature so that
crash dump tools can be sure they are decoding the right blob of memory.
Use memcpy() instead of strncpy().
Fixes:
|
||
|---|---|---|
| .. | ||
| Makefile | ||
| amd.c | ||
| apei.c | ||
| core.c | ||
| dev-mcelog.c | ||
| genpool.c | ||
| inject.c | ||
| intel.c | ||
| internal.h | ||
| p5.c | ||
| severity.c | ||
| therm_throt.c | ||
| threshold.c | ||
| winchip.c | ||