diff options
author | Andreas Stieger <[email protected]> | 2016-09-21 12:28:23 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2016-09-21 14:46:06 +0000 |
commit | ae324b51ffa338b891387bff2657d60c1fd3ae40 (patch) | |
tree | 8fbc4f8ca898fa10a293ba47020bc98c0d021613 /lang/cpp | |
parent | Post release updates (diff) | |
download | gpgme-ae324b51ffa338b891387bff2657d60c1fd3ae40.tar.gz gpgme-ae324b51ffa338b891387bff2657d60c1fd3ae40.zip |
cpp: Avoid missing returns in non-void functions
* lang/cpp/src/context.cpp
(Context::signaturePolicyURL): return nullptr on default
(to_tofu_policy_t): add default case for unknown
* lang/cpp/src/key.cpp
(Key::primaryFingerprint): return nullptr on default
* lang/cpp/src/tofuinfo.cpp
(GpgME::TofuInfo::policy): add default case for unknown
Signed-off-by: Andreas Stieger <[email protected]>
Signed-off-by: Andre Heinecke <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | lang/cpp/src/context.cpp | 2 | ||||
-rw-r--r-- | lang/cpp/src/key.cpp | 1 | ||||
-rw-r--r-- | lang/cpp/src/tofuinfo.cpp | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp index 00f397b4..43a73b1f 100644 --- a/lang/cpp/src/context.cpp +++ b/lang/cpp/src/context.cpp @@ -1051,6 +1051,7 @@ const char *Context::signaturePolicyURL() const return n->value; } } + return nullptr; } Notation Context::signatureNotation(unsigned int idx) const @@ -1344,6 +1345,7 @@ static gpgme_tofu_policy_t to_tofu_policy_t(unsigned int policy) case TofuInfo::PolicyAsk: return GPGME_TOFU_POLICY_ASK; case TofuInfo::PolicyUnknown: + default: return GPGME_TOFU_POLICY_UNKNOWN; } } diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp index cfa1ba31..a56f77ca 100644 --- a/lang/cpp/src/key.cpp +++ b/lang/cpp/src/key.cpp @@ -273,6 +273,7 @@ const char *Key::primaryFingerprint() const /* Return the first subkeys fingerprint */ return key->subkeys->fpr; } + return nullptr; } unsigned int Key::keyListMode() const diff --git a/lang/cpp/src/tofuinfo.cpp b/lang/cpp/src/tofuinfo.cpp index bb67fc8c..e661b3b1 100644 --- a/lang/cpp/src/tofuinfo.cpp +++ b/lang/cpp/src/tofuinfo.cpp @@ -109,6 +109,7 @@ GpgME::TofuInfo::Policy GpgME::TofuInfo::policy() const case GPGME_TOFU_POLICY_ASK: return PolicyAsk; case GPGME_TOFU_POLICY_UNKNOWN: + default: return PolicyUnknown; } } |