Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new WORKING machine ------------------- Yamaha MU50 [O. Galibert, Phil Bennett]
- Loading branch information
new WORKING machine ------------------- Yamaha MU50 [O. Galibert, Phil Bennett]
e96df77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GCC 11.2 (mamedev version) compile error that at first glance doesn't make sense.
C:/MAME/src/devices/sound/swp00.cpp: In member function 'virtual void swp00_device::sound_stream_update(sound_stream&, const std::vector<read_stream_view>&, std::vector<write_stream_view>&)':
C:/MAME/src/devices/sound/swp00.cpp:1088:17: error: 'var_out_r' may be used uninitialized in this function [-Werror=maybe-uninitialized]
1088 | return (s64(value) * mult) >> 7;
| ^~~~~~~~~~
C:/MAME/src/devices/sound/swp00.cpp:1413:32: note: 'var_out_r' was declared here
1413 | s32 var_out_l, var_out_r;
| ^~~~~~~~~
C:/MAME/src/devices/sound/swp00.cpp:1088:17: error: 'var_out_l' may be used uninitialized in this function [-Werror=maybe-uninitialized]
1088 | return (s64(value) * mult) >> 7;
| ^~~~~~~~~~
C:/MAME/src/devices/sound/swp00.cpp:1413:21: note: 'var_out_l' was declared here
1413 | s32 var_out_l, var_out_r;
| ^~~~~~~~~
I locally initialised the 2 variables on line 1413 and then compilation succeeded.
e96df77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e96df77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into it too with newest GCC.
Warning should be gone here: 8a574df