mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-25 17:21:06 +00:00
This commit fixes the following build error when the source code is build with MinGW gcc 12 and compiler switch '-Werror=maybe-uninitialized' is added: 'file.{anonymous}::OutputFile::old_mode_' may be used uninitialized in this function [-Werror=maybe-uninitialized]
This commit is contained in:
parent
bd83b772c3
commit
3eff21366e
@ -127,7 +127,7 @@ class OutputFile {
|
|||||||
public:
|
public:
|
||||||
// Opens |filename| in the given mode. If |filename| is nullptr, the empty
|
// Opens |filename| in the given mode. If |filename| is nullptr, the empty
|
||||||
// string or "-", stdout will be set to the given mode.
|
// string or "-", stdout will be set to the given mode.
|
||||||
OutputFile(const char* filename, const char* mode) {
|
OutputFile(const char* filename, const char* mode) : old_mode_(0) {
|
||||||
const bool use_stdout =
|
const bool use_stdout =
|
||||||
!filename || (filename[0] == '-' && filename[1] == '\0');
|
!filename || (filename[0] == '-' && filename[1] == '\0');
|
||||||
if (use_stdout) {
|
if (use_stdout) {
|
||||||
|
Loading…
Reference in New Issue
Block a user