This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CODECOMPOSER: CCS is warning about "pointless comparison of unsigned integer with zero" when using an enum.

Part Number: CODECOMPOSER


Tool/software:

HI,

I want to check enum boundaries using a macro and CCS is raising the #188-D Warning. 

Here's a simplification of my problem:

Because an enum can be signed or unsigned (in C23 we could fix this issue, but I think CCS only support C11) I don't see why this warning is generated.

Is this a compiler bug? Is there a way to make the compiler happy? 

Regards,
Gabriel