diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-04-28 10:59:25 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-04-28 10:04:39 +0000 |
commit | 33ad832d3a5d71978cc8607d3d12a38136d3bb73 (patch) | |
tree | 8aade662b8092381688d096e5ad4fc5dd9910b23 | |
parent | f0ad7794a4d03827262ca0a3a952e7e0ccd47cf0 (diff) |
Fix GCC warning
app/perfattributes.cpp:28: warning: ‘void* memset(void*, int, size_t)’
clearing an object of non-trivial type ‘class PerfEventAttributes’; use
assignment or value-initialization instead [-Wclass-memaccess]
28 | memset(this, 0, sizeof(PerfEventAttributes));
| ^
Change-Id: I1970aaa3e17073bdabfdb4d1805d7e64dc64c464
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | app/perfattributes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/perfattributes.cpp b/app/perfattributes.cpp index 3493d6b..d13f9ac 100644 --- a/app/perfattributes.cpp +++ b/app/perfattributes.cpp @@ -25,7 +25,7 @@ PerfEventAttributes::PerfEventAttributes() { - memset(this, 0, sizeof(PerfEventAttributes)); + *this = PerfEventAttributes{}; } QDataStream &operator>>(QDataStream &stream, PerfEventAttributes &attrs) |