Fix warnings when compiling tests with gcc