Re: enabling -Werror=assign-enum for kernel
- In reply to: Gleb Smirnoff : "Re: enabling -Werror=assign-enum for kernel"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Aug 2026 20:46:47 UTC
> On 27. Aug 2026, at 19:02, Gleb Smirnoff <glebius@FreeBSD.org> 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