[git] GPGME - branch, master, updated. gpgme-1.6.0-396-gae324b5

by Andreas Stieger cvs at cvs.gnupg.org
Wed Sep 21 16:46:58 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  ae324b51ffa338b891387bff2657d60c1fd3ae40 (commit)
      from  0b78bc7ba40972402f8ab7919313c000ef1f6385 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ae324b51ffa338b891387bff2657d60c1fd3ae40
Author: Andreas Stieger <astieger at suse.com>
Date:   Wed Sep 21 14:28:23 2016 +0200

    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 <astieger at suse.com>
    Signed-off-by: Andre Heinecke <aheinecke at intevation.de>

diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp
index 00f397b..43a73b1 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 cfa1ba3..a56f77c 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 bb67fc8..e661b3b 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;
     }
 }

-----------------------------------------------------------------------

Summary of changes:
 lang/cpp/src/context.cpp  | 2 ++
 lang/cpp/src/key.cpp      | 1 +
 lang/cpp/src/tofuinfo.cpp | 1 +
 3 files changed, 4 insertions(+)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list