warning C4101: 'p_ci3' : unreferenced local variable
 warning C4101: 'p_i' : unreferenced local variable
 warning C4101: 'p_ci2' : unreferenced local variable
 warning C4101: 'p_ci4' : unreferenced local variable

Please look at i variable