summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-08-29 04:55:24 -0700
committerPatrick Ohly <patrick.ohly@intel.com>2016-08-29 04:55:24 -0700
commit16e6e854c30023badb94fe093d41dc8e45de488d (patch)
treedc302d784e7239742bac8e52316575bac5df809b /src
parentd560aeda07895131416aeab9bd4d73db22edba71 (diff)
gdbus-cxx-bridge.h: avoid false cppcheck warning
cppcheck seems to mix up different template variations. The following error needs to be suppressed in the classes which don't even have an m_a member: gdbus-cxx-bridge.h:330: cppcheck warning: uninitMemberVar - Member variable 'Set::m_a' is not initialized in the constructor. gdbus-cxx-bridge.h:339: cppcheck warning: uninitMemberVar - Member variable 'Set::m_a' is not initialized in the constructor.
Diffstat (limited to 'src')
-rw-r--r--src/gdbus/gdbus-cxx-bridge.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gdbus/gdbus-cxx-bridge.h b/src/gdbus/gdbus-cxx-bridge.h
index 8e70794b..c3a0c910 100644
--- a/src/gdbus/gdbus-cxx-bridge.h
+++ b/src/gdbus/gdbus-cxx-bridge.h
@@ -327,6 +327,7 @@ struct AppendArgs {
/** default: skip it, not a result of the method */
template<class A> struct Set
{
+ // cppcheck-suppress uninitMemberVar
Set(A &a) {}
AppendArgs &set(AppendArgs &context) const {
return context;
@@ -336,6 +337,7 @@ template<class A> struct Set
/** same for const reference */
template<class A> struct Set <const A &>
{
+ // cppcheck-suppress uninitMemberVar
Set(A &a) {}
AppendArgs &set(AppendArgs &context) const {
return context;