[Scummvm-git-logs] scummvm master -> e7ef267daab677cefe7d20c22fab7d762ea75c85
aquadran
noreply at scummvm.org
Tue May 31 16:19:54 UTC 2022
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:
e7ef267daa GLK: Fixed compiler warning "taking address of packed member of class or structure may result in an unaligned pointer va
Commit: e7ef267daab677cefe7d20c22fab7d762ea75c85
https://github.com/scummvm/scummvm/commit/e7ef267daab677cefe7d20c22fab7d762ea75c85
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-05-31T18:19:47+02:00
Commit Message:
GLK: Fixed compiler warning "taking address of packed member of class or structure may result in an unaligned pointer value"
Changed paths:
engines/glk/alan2/types.cpp
diff --git a/engines/glk/alan2/types.cpp b/engines/glk/alan2/types.cpp
index 47a7062f445..6c35e7e33cb 100644
--- a/engines/glk/alan2/types.cpp
+++ b/engines/glk/alan2/types.cpp
@@ -25,25 +25,24 @@ namespace Glk {
namespace Alan2 {
// This works around gcc errors for passing packed structure fields
-static void syncVal(Common::Serializer &s, int *fld) {
- int &v = *fld;
- s.syncAsSint32LE(v);
+static void syncVal(Common::Serializer &s, int &fld) {
+ s.syncAsSint32LE(fld);
}
void CurVars::synchronize(Common::Serializer &s) {
- syncVal(s, &vrb);
- syncVal(s, &obj);
- syncVal(s, &loc);
- syncVal(s, &act);
- syncVal(s, &tick);
- syncVal(s, &score);
- syncVal(s, &visits);
+ syncVal(s, vrb);
+ syncVal(s, obj);
+ syncVal(s, loc);
+ syncVal(s, act);
+ syncVal(s, tick);
+ syncVal(s, score);
+ syncVal(s, visits);
}
void EvtqElem::synchronize(Common::Serializer &s) {
- syncVal(s, &time);
- syncVal(s, &event);
- syncVal(s, &where);
+ syncVal(s, time);
+ syncVal(s, event);
+ syncVal(s, where);
}
} // End of namespace Alan2
More information about the Scummvm-git-logs
mailing list