[Libreoffice-commits] core.git: hwpfilter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 19 07:36:38 UTC 2018


 hwpfilter/source/drawing.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 32d32b1419655c5fe80d0b4a76c9b6b3118f323f
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 18 21:51:49 2018 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Dec 19 08:36:15 2018 +0100

    -Werror=class-memaccess (trunk towards GCC 9)
    
    ..."‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct
    HWPDrawingObject’ with no trivial copy-assignment; use value-initialization
    instead" after 96c85e7d107ad0d79295349f01cd8578ce7daeba "loplugin:useuniqueptr
    in hwpfilter"
    
    Change-Id: Iee2b0ba2ec57233a311c88cb904af2bae71286d0
    Reviewed-on: https://gerrit.libreoffice.org/65375
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h
index 4a03ce47e18e..7e986455f935 100644
--- a/hwpfilter/source/drawing.h
+++ b/hwpfilter/source/drawing.h
@@ -677,9 +677,11 @@ int cmd, void * /*argp*/, int /*argv*/)
 }
 
 
-HWPDrawingObject::HWPDrawingObject()
+HWPDrawingObject::HWPDrawingObject():
+    type(0), offset{0, 0}, offset2{0, 0}, extent{0, 0}, vrect{0, 0, 0, 0}
 {
-    memset(this, 0, sizeof(HWPDrawingObject));
+    memset(&property, 0, sizeof property);
+    memset(&u, 0, sizeof u);
     index = ++count;
 }
 


More information about the Libreoffice-commits mailing list