Re: enabling -Werror=assign-enum for kernel

Michael Tuexen <[email protected]>
Newsgroups gmane.os.freebsd.current
Message-ID <AD3199B2-4E00-4A9A-82AD-1F0461683903__22177.4324121483$1787863676$gmane$org@FreeBSD.org>
> On 27. Aug 2026, at 19:02, Gleb Smirnoff <[email protected]> wrote:
> 
> On Thu, Aug 27, 2026 at 06:47:54PM +0200, Michael Tuexen wrote:
> M> > Yes, you are right.  The mistake I described above won't be catched by this
> M> > Werror.  Other enum usage errors can be caught though.
> M> Which ones? I am only aware of missing values in a switch statement.
> 
> Assigning something that doesn't belong to enum.
> 
> Examples:
> 
> e79f6aa3e5e122a56875c472fb08c8db1db26e46
> 2ae8976a3f6a7e4deb1905326145f5c2575264f4
> 9d765453b0a93f2ec4ca2b91c3a20ec909bd3b6d
> 6a15fd92392cfda1e0b7608e1a4a08509bc796f3
> d2a9eef321dca4738d44edf8b73c8037332b8060
Ahh, thank you very much! Makes sense.

Best regards
Michael
> 
> -- 
> Gleb Smirnoff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.