keil中报警告comparison of constant 100 with boolean expression is always true

keil中变量Wave_Fre为变值

需要更改为

if( (0<=Wave_Fre)&&(Wave_Fre<=100))

因为在C中运算符计算从左到右,((0<=Wave_Fre) <= 100 )

你可能感兴趣的:(硬件工程,stm32)