Fix incompatible pointer type warning