Add pragma to avoid gcc 8 compiler warning.
@@ -27,7 +27,11 @@ FNET_PacketQueue_NoLock::ExpandBuf(uint32_t needentries)
uint32_t rOfs = _out_pos;
uint32_t rLen = (_in_pos - _out_pos);
+//TODO Rewrite to pure C++
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
memcpy(newbuf + rOfs, _buf + rOfs, rLen * sizeof(_QElem));
+#pragma GCC diagnostic pop
} else { // WRAPPED
// BUFFER: |....................|
// USED: |######........######|
@@ -35,9 +39,11 @@ FNET_PacketQueue_NoLock::ExpandBuf(uint32_t needentries)
uint32_t r1Len = _in_pos;
uint32_t r2Len = (oldsize - _out_pos);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
memcpy(newbuf, _buf, r1Len * sizeof(_QElem));
- memcpy(newbuf + _bufsize - r2Len, _buf + oldsize - r2Len,
- r2Len * sizeof(_QElem));
+ memcpy(newbuf + _bufsize - r2Len, _buf + oldsize - r2Len, r2Len * sizeof(_QElem));
+#pragma GCC diagnostic pop
_out_pos += _bufsize - oldsize;
}
free(_buf);
