From cdafb7e27fb7e9387d171b71f2a57b05eebf6391 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Mon, 23 Mar 2020 16:44:06 +0100 Subject: [PATCH] Fix a few compiler warnings --- .../src/async-method-wrapper-template.cpp.tmpl | 2 +- openpgpsdk/src/openpgpsdk/readerwriter.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jsonapi-generator/src/async-method-wrapper-template.cpp.tmpl b/jsonapi-generator/src/async-method-wrapper-template.cpp.tmpl index 16bfe3304..29f53ad48 100644 --- a/jsonapi-generator/src/async-method-wrapper-template.cpp.tmpl +++ b/jsonapi-generator/src/async-method-wrapper-template.cpp.tmpl @@ -44,7 +44,7 @@ $%inputParamsDeserialization%$ const std::weak_ptr weakService(mService); const std::weak_ptr weakSession(session); - $%callbackName%$ = [this, weakService, weakSession]($%callbackParams%$) + $%callbackName%$ = [weakService, weakSession]($%callbackParams%$) { auto session = weakSession.lock(); if(!session || session->is_closed()) return; diff --git a/openpgpsdk/src/openpgpsdk/readerwriter.c b/openpgpsdk/src/openpgpsdk/readerwriter.c index f3a16c364..78b45e28c 100644 --- a/openpgpsdk/src/openpgpsdk/readerwriter.c +++ b/openpgpsdk/src/openpgpsdk/readerwriter.c @@ -462,9 +462,9 @@ char *ops_get_passphrase(void) { #ifndef __ANDROID__ return ops_malloc_passphrase(getpass("Passphrase: ")); -#else // __ANDROID__ - return ops_malloc_passphrase("getpass not supported on android"); -#warning "getpass not supported on android" +#else // __ANDROID + // We should never get here on Android, getpass not supported. + abort(); #endif // __ANDROID__ }