fixing warnings
fix warnings in C code