Skip to content
Snippets Groups Projects
Commit ed81a44e authored by Adam Borowski's avatar Adam Borowski
Browse files

test: don't print the address of a FILE after fclose

In pre-release gcc-12 that Fedora releases with, it triggers
-Werror=use-after-free despite us not dereferencing the pointer.
Its address is no longer useful for debugging anyway.
parent 7e4ff568
No related branches found
No related tags found
No related merge requests found
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2018, Intel Corporation */
/* Copyright 2014-2021, Intel Corporation */
/*
* ut_file.c -- unit test file operations
......@@ -88,10 +88,8 @@ ut_fclose(const char *file, int line, const char *func, FILE *stream)
{
int retval = os_fclose(stream);
if (retval != 0) {
ut_fatal(file, line, func, "!fclose: 0x%llx",
(unsigned long long)stream);
}
if (retval != 0)
ut_fatal(file, line, func, "!fclose");
return retval;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment