cpp: test: Remove GCC warnings in compat tests