auto.cpp: In function ‘int autooo(unsigned int)’:
auto.cpp:33:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Type cast the code before you were comparing the signed and unsigned code to avoid warning
int a;
unsigned int b;
if(a==b) gives warning
if(a == (int)b)
will resolve your issue
Blind casting will lead to some unexpected results
The warning is because ranges for signed and unsigned are different.
Casting will work fine when signed integer you were used for comparison was greater than zero.
so have check whether the signed integer is greater that zero before comparing
More info here