incompatible pointer type warning fix