diff options
author | Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp> | 2019-08-14 10:59:19 +0900 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2020-11-05 16:32:07 -0800 |
commit | d51921b05c32287238b1b0447d7e952884f63eb5 (patch) | |
tree | 24082abf6de76776a6745f4aa2f0db599857253f /libparted/fs/amiga/amiga.c | |
parent | f75af2cfbbd1a2d82ed3df4955014f73737ae13e (diff) | |
download | parted-d51921b05c32287238b1b0447d7e952884f63eb5.tar.gz |
libparted: Fix warnings from GCC 8 -Wunused-variable and -Warray-bounds
GCC 8 reports two warnings as follows.
r/fat/bootsector.c: In function 'fat_boot_sector_set_boot_code':
r/fat/bootsector.c:274:15: warning: unused variable 'fs_info' [-Wunused-variable]
FatSpecific* fs_info = FAT_SPECIFIC (fs);
^~~~~~~
In function 'memcpy',
inlined from 'fat_boot_sector_set_boot_code' at r/fat/bootsector.c:283:2:
/usr/include/bits/string_fortified.h:34:10: warning: '__builtin_memcpy' forming offset [126, 128] is out of the bounds [0, 125] [-Warray-bounds]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To avoid the warnings, remove the unused variable. Use strcpy in place of
memcpy checking copy length.
Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
Diffstat (limited to 'libparted/fs/amiga/amiga.c')
0 files changed, 0 insertions, 0 deletions