[Scummvm-git-logs] scummvm master -> fde5ab1af4ffff8c0675c94b13646e9eb2574672
athrxx
noreply at scummvm.org
Sun Aug 25 18:15:10 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fde5ab1af4 SCUMM: hopefully fix gcc strict-aliasing warning
Commit: fde5ab1af4ffff8c0675c94b13646e9eb2574672
https://github.com/scummvm/scummvm/commit/fde5ab1af4ffff8c0675c94b13646e9eb2574672
Author: athrxx (athrxx at scummvm.org)
Date: 2024-08-25T20:14:48+02:00
Commit Message:
SCUMM: hopefully fix gcc strict-aliasing warning
Changed paths:
engines/scumm/players/player_mac_new.cpp
diff --git a/engines/scumm/players/player_mac_new.cpp b/engines/scumm/players/player_mac_new.cpp
index 028844d52d0..5ffb6989ee2 100644
--- a/engines/scumm/players/player_mac_new.cpp
+++ b/engines/scumm/players/player_mac_new.cpp
@@ -522,8 +522,12 @@ MacSndChannel::~MacSndChannel() {
}
MacLowLevelPCMDriver::ChanHandle MacSndChannel::getHandle() const {
- const void *ptr = this;
- return *reinterpret_cast<const int*>(&ptr);
+ union {
+ const void *ptr;
+ int hdl;
+ } cnv;
+ cnv.ptr = this;
+ return cnv.hdl;
}
void MacSndChannel::playSamples(const MacLowLevelPCMDriver::PCMSound *snd) {
More information about the Scummvm-git-logs
mailing list