empty control statement (?)
I have a program. Here is the code that is giving me a warning:
Code:
void Sensor::SetSensorState(char *cState) {
char On[] = "On";
char Off[] = "Off";
if(!strcmp(cState, On));
strncpy(State, cState, 50);*
if(!strcmp(cState, Off));
strncpy(State, cState, 50);*
}
On the lines with the '*' I am getting a warning that says :
warning C4390: ';' : empty controlled statement found; is this the intent?
as I said this is a warning, not an error, so my program compiles and runs (up to this point).
what should I change about the code above?
[edit]
nevermind....duh...that was a lame mistake...