警告枚举类型与其他类型混合?

Raf*_*fal 5 c enums compiler-warnings

我有一个接受 3 个 unsigned int args 的函数func(unsigned int, unsigned int, unsigned int)。在调用它时,我传递枚举,该枚举被初始化为“2”作为第一个参数。收到此警告Warning[Pe188]: enumerated type mixed with another type。如何纠正?

Arj*_*ran 2

这个问题并没有告诉你到底想传递什么,但看起来该函数需要参数的枚举类型,因为它提供了一个整数。请记住,不同的类型是不同的enumint