summaryrefslogtreecommitdiff
path: root/src/mumblemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-20 01:43:28 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-20 01:43:28 +0300
commit8e7bb25493113cf0ac550acac4634a08f8182cb8 (patch)
treebb506e8a39bdafa271d1d1732f131e88aa2ebba2 /src/mumblemanager.cpp
parent41959b08b3e44e00e7a388451142ee7934f05d2b (diff)
downloadmanaplus-8e7bb25493113cf0ac550acac4634a08f8182cb8.tar.gz
manaplus-8e7bb25493113cf0ac550acac4634a08f8182cb8.tar.bz2
manaplus-8e7bb25493113cf0ac550acac4634a08f8182cb8.tar.xz
manaplus-8e7bb25493113cf0ac550acac4634a08f8182cb8.zip
Add some warnings ignores in mumblemanager for gcc 8+.
Diffstat (limited to 'src/mumblemanager.cpp')
-rw-r--r--src/mumblemanager.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mumblemanager.cpp b/src/mumblemanager.cpp
index 27aed89e6..d003cfbbb 100644
--- a/src/mumblemanager.cpp
+++ b/src/mumblemanager.cpp
@@ -189,7 +189,10 @@ void MumbleManager::setPlayer(const std::string &userName)
// (e.g. the ingame Name).
mbstowcs(mLinkedMemCache.identity, userName.c_str(), 256);
mLinkedMemCache.uiTick ++;
+PRAGMA8(GCC diagnostic push)
+PRAGMA8(GCC diagnostic ignored "-Wclass-memaccess")
memcpy(mLinkedMem, &mLinkedMemCache, sizeof(mLinkedMemCache));
+PRAGMA8(GCC diagnostic pop)
}
void MumbleManager::setAction(const int action)
@@ -217,7 +220,10 @@ void MumbleManager::setAction(const int action)
mLinkedMemCache.fCameraPosition[1] = mLinkedMemCache.fAvatarPosition[1];
mLinkedMemCache.uiTick++;
+PRAGMA8(GCC diagnostic push)
+PRAGMA8(GCC diagnostic ignored "-Wclass-memaccess")
memcpy(mLinkedMem, &mLinkedMemCache, sizeof(mLinkedMemCache));
+PRAGMA8(GCC diagnostic pop)
}
void MumbleManager::setPos(const int tileX, const int tileY,
@@ -267,7 +273,10 @@ void MumbleManager::setPos(const int tileX, const int tileY,
}
mLinkedMemCache.uiTick ++;
+PRAGMA8(GCC diagnostic push)
+PRAGMA8(GCC diagnostic ignored "-Wclass-memaccess")
memcpy(mLinkedMem, &mLinkedMemCache, sizeof(mLinkedMemCache));
+PRAGMA8(GCC diagnostic pop)
}
void MumbleManager::setMap(const std::string &mapName)
@@ -293,11 +302,17 @@ void MumbleManager::setServer(const std::string &serverName)
size = sizeof(mLinkedMemCache.context) - 1;
memset(mLinkedMemCache.context, 0, sizeof(mLinkedMemCache.context));
+PRAGMA8(GCC diagnostic push)
+PRAGMA8(GCC diagnostic ignored "-Wclass-memaccess")
memcpy(mLinkedMemCache.context, serverName.c_str(), size);
+PRAGMA8(GCC diagnostic pop)
mLinkedMemCache.context[size] = '\0';
mLinkedMemCache.context_len = size;
mLinkedMemCache.uiTick ++;
+PRAGMA8(GCC diagnostic push)
+PRAGMA8(GCC diagnostic ignored "-Wclass-memaccess")
memcpy(mLinkedMem, &mLinkedMemCache, sizeof(mLinkedMemCache));
+PRAGMA8(GCC diagnostic pop)
}
#endif // USE_MUMBLE