Resolve -Werror=incompatible-pointer-types-discards-qualifiers