[poppler] poppler/Array.cc poppler/Dict.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon May 7 17:14:17 UTC 2018
poppler/Array.cc | 2 +-
poppler/Dict.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 07b8f838b3d8859a3ad34a3140bb24475bd6ac2c
Author: Albert Astals Cid <aacid at kde.org>
Date: Mon May 7 19:13:07 2018 +0200
cast to void * to bypass new gcc -Wclass-memaccess warning
Yes what we're doing there is a bit nasty but it works :D
diff --git a/poppler/Array.cc b/poppler/Array.cc
index 3276349f..e8aa34ea 100644
--- a/poppler/Array.cc
+++ b/poppler/Array.cc
@@ -112,7 +112,7 @@ void Array::remove(int i) {
#endif
}
--length;
- memmove( elems + i, elems + i + 1, sizeof(elems[0]) * (length - i) );
+ memmove( static_cast<void*>(elems + i), elems + i + 1, sizeof(elems[0]) * (length - i) );
}
Object Array::get(int i, int recursion) const {
diff --git a/poppler/Dict.cc b/poppler/Dict.cc
index a431f7eb..bc86fd77 100644
--- a/poppler/Dict.cc
+++ b/poppler/Dict.cc
@@ -201,7 +201,7 @@ void Dict::remove(const char *key) {
gfree(entries[pos].key);
entries[pos].val.free();
if (pos != length) {
- memmove(&entries[pos], &entries[pos + 1], (length - pos) * sizeof(DictEntry));
+ memmove(static_cast<void*>(&entries[pos]), &entries[pos + 1], (length - pos) * sizeof(DictEntry));
}
}
} else {
More information about the poppler
mailing list