Fix: error pointer target types incompatible in C++ [-Werror=c++-compat]