[parted-devel] [PATCH 00/24] GCC 10 Warning Cleanup

Brian C. Lane bcl at redhat.com
Sat Nov 14 00:11:43 GMT 2020


This giant pile of patches shoud, I hope, take care of the existing GCC
warnings. I was working from fedora rawhide using gcc-10.2.1 and had a
lovely time getting all the cast alignment warnings happy without (I
THINK) scrambling the code.

A big part of the trouble here was in the resize code, which we need to
talk about.

I'd like to get a 3.4 release with these patches out before the end of
the year. Next year I want to drop the /r/ resize library again. It has
no place in parted, isn't maintained, and isn't something I'd suggest
anyone using. Filesystem code should be maintained by filesystem tools
so if someone wants to move it into some other project that's fine with
me but I strongly believe that it needs to be removed.

We can talk about that in another thread though. For this one it would
be good if people who care about the resize code make sure I didn't
introduce new bugs. The tests pass, and we do have some for the resize
code, but inside there is a twisty path that I'm sure isn't covered
100%.

Thanks,

Brian


Brian C. Lane (17):
  bsd: Fix gcc complaints when using boot_code pointer
  dos: Fix gcc complaints when using boot_code pointer
  linux: Fix gcc complains about signed sccanf variables
  tests: Fix unsigned warning in duplicate.c
  hfs: Fix gcc 10 bounds check warning
  hfs/advfs: Fix gcc 10 warnings about cast alignment
  hfs/advfs_plus: Fix gcc 10 warnings about cast alignment
  hfs/hfs: Fix gcc 10 warnings about cast alignment
  ext2: Fix gcc 10 warnings about cast alignment
  nilfs2: Fix gcc 10 warnings about cast alignment
  ntfs:  Fix gcc 10 warnings about cast alignment
  ufs:  Fix gcc 10 warnings about cast alignment
  ped_assert: Fix incorrect exception option
  ui: Fix command_line_get_disk_flag
  ui: Fix gcc 10 warning about snprintf truncating an int
  hfs/reloc: Fix gcc 10 warnings about cast alignment
  hfs/reloc_plus: Fix gcc 10 warnings about cast alignment

Shin'ichiro Kawasaki (7):
  libparted: Fix a GCC warning -Wunused-but-set-variable
  libparted: Fix warnings from GCC 8 -Wunused-variable and
    -Warray-bounds
  libparted: Fix warnings from GCC's -Wimplicit-fallthrough
  libparted: Avoid a GCC warning for unused functions
  libparted: Avoid warnings from GCC 8 -Wsuggest-attribute=pure
  libparted: Fix warnings from GCC 8 -Wsuggest-attribute=pure
  libparted: Fix warnings from GCC 8 -Wsuggest-attribute=const

 libparted/arch/linux.c          |  8 ++++----
 libparted/debug.c               |  2 +-
 libparted/fs/amiga/affs.c       |  5 ++---
 libparted/fs/amiga/amiga.c      |  1 +
 libparted/fs/ext2/ext2_fs.h     |  2 +-
 libparted/fs/ext2/interface.c   |  7 ++++---
 libparted/fs/fat/bootsector.c   |  2 +-
 libparted/fs/hfs/hfs.h          |  2 +-
 libparted/fs/nilfs2/nilfs2.c    | 11 +++++-----
 libparted/fs/ntfs/ntfs.c        | 11 +++++-----
 libparted/fs/r/fat/bootsector.c |  7 +++----
 libparted/fs/r/fat/bootsector.h |  2 --
 libparted/fs/r/fat/calc.c       | 24 +++++++++++++---------
 libparted/fs/r/fat/clstdup.c    |  5 +++++
 libparted/fs/r/fat/context.c    |  4 ++--
 libparted/fs/r/fat/count.c      |  4 ++--
 libparted/fs/r/fat/table.c      |  9 +++++++--
 libparted/fs/r/fat/traverse.c   | 14 ++++++-------
 libparted/fs/r/hfs/advfs.c      | 29 ++++++++++++++------------
 libparted/fs/r/hfs/advfs_plus.c | 26 +++++++++++++-----------
 libparted/fs/r/hfs/cache.c      |  5 +++++
 libparted/fs/r/hfs/hfs.c        | 13 +++++++-----
 libparted/fs/r/hfs/hfs.h        |  2 +-
 libparted/fs/r/hfs/reloc.c      | 36 +++++++++++++++++++--------------
 libparted/fs/r/hfs/reloc_plus.c | 33 +++++++++++++++++-------------
 libparted/fs/ufs/ufs.c          |  8 ++++----
 libparted/labels/bsd.c          | 13 +++++-------
 libparted/labels/dos.c          |  2 +-
 parted/ui.c                     |  6 +++---
 tests/duplicate.c               |  2 +-
 30 files changed, 165 insertions(+), 130 deletions(-)

-- 
2.26.2




More information about the parted-devel mailing list