[parted-devel] GCC unhappy with "case PED_EXCEPTION_OK_CANCEL:"

Brian C. Lane bcl at redhat.com
Fri Jul 9 22:51:41 BST 2021


On Sun, Jun 27, 2021 at 05:48:35PM -0400, D. Hugh Redelmeier wrote:
> I'm compiling fatresize.  It uses parted/exception.h
> 
> I get a warning from GCC:
> fatresize.c:319:9: warning: case value ‘96’ not in enumerated type 
> ‘PedExceptionOption’ [-Wswitch]
>   319 |         case PED_EXCEPTION_IGNORE_CANCEL:
>       |         ^~~~

Thanks for the patch, but I'm undecided as to whether this is better. I
almost feel like this is a gcc problem -- it knows about the enum, and
it knows the defines combining the enum values are using them, so it
ought to (in my ideal world) figure it out.

But I'm open to hear what others think.

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart




More information about the parted-devel mailing list