Re: enabling -Werror=assign-enum for kernel

Gleb Smirnoff <[email protected]>
Newsgroups gmane.os.freebsd.current
Message-ID <apBtiJJuMn1Emjl9__30804.3121638306$1787850244$gmane$org@cell.glebi.us>
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

-- 
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.