Skip to content
Snippets Groups Projects
Unverified Commit 14a7c9b0 authored by Piotr Balcer's avatar Piotr Balcer Committed by GitHub
Browse files

Merge pull request #5400 from kilobyte/gcc-12-print-fclose

don't access the address of a FILE after fclose
parents 7e4ff568 ed81a44e
No related branches found
No related tags found
No related merge requests found
// SPDX-License-Identifier: BSD-3-Clause // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2018, Intel Corporation */ /* Copyright 2014-2021, Intel Corporation */
/* /*
* ut_file.c -- unit test file operations * ut_file.c -- unit test file operations
...@@ -88,10 +88,8 @@ ut_fclose(const char *file, int line, const char *func, FILE *stream) ...@@ -88,10 +88,8 @@ ut_fclose(const char *file, int line, const char *func, FILE *stream)
{ {
int retval = os_fclose(stream); int retval = os_fclose(stream);
if (retval != 0) { if (retval != 0)
ut_fatal(file, line, func, "!fclose: 0x%llx", ut_fatal(file, line, func, "!fclose");
(unsigned long long)stream);
}
return retval; 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