Forum Discussion
Altera_Forum
Honored Contributor
16 years agoProblem with reading from Uart
I am getting the following warnings when I build my project passing arg 1 of `fgets' from incompatible pointer type passing arg 1 of `fgets' makes pointer from integer without a cast ...
Altera_Forum
Honored Contributor
16 years agoYou also need to change this to:
char Sonar_Height ;
fgets stores a NUL in the last position and you called fgets with a count of 4. When it writes the 0 to Sonar_Height [3] you will overwrite a byte, possibly the return address crashing this function. Bill