removed unused variables from 3 C functions