[tilem/f41] Fix for -Werror=incompatible-pointer-types, fix type for g_new