Fixed C compiler warning about unused variable when not building in debug.
authorEdouard Tisserant <edouard@pep-project.org>
Tue, 23 May 2017 11:04:45 +0200
changeset 180288931f5dcf75
parent 1801 a04a47881059
child 1803 656f58b5b244
Fixed C compiler warning about unused variable when not building in debug.
src/pEpEngine.h
src/pgp_gpg.c
     1.1 --- a/src/pEpEngine.h	Fri May 19 17:42:04 2017 +0200
     1.2 +++ b/src/pEpEngine.h	Tue May 23 11:04:45 2017 +0200
     1.3 @@ -46,6 +46,7 @@
     1.4      PEP_KEY_HAS_AMBIG_NAME                          = 0x0202,
     1.5      PEP_GET_KEY_FAILED                              = 0x0203,
     1.6      PEP_CANNOT_EXPORT_KEY                           = 0x0204,
     1.7 +    PEP_CANNOT_EDIT_KEY                             = 0x0205,
     1.8      
     1.9      PEP_CANNOT_FIND_IDENTITY                        = 0x0301,
    1.10      PEP_CANNOT_SET_PERSON                           = 0x0381,
     2.1 --- a/src/pgp_gpg.c	Fri May 19 17:42:04 2017 +0200
     2.2 +++ b/src/pgp_gpg.c	Tue May 23 11:04:45 2017 +0200
     2.3 @@ -1940,11 +1940,14 @@
     2.4      gpgme_error = gpg.gpgme_op_edit(session->ctx, key, renew_fsm, &handle,
     2.5              output);
     2.6      assert(gpgme_error == GPG_ERR_NO_ERROR);
     2.7 +    if(gpgme_error != GPG_ERR_NO_ERROR) {
     2.8 +        status = PEP_CANNOT_EDIT_KEY;
     2.9 +    }
    2.10  
    2.11      gpg.gpgme_data_release(output);
    2.12      gpg.gpgme_key_unref(key);
    2.13  
    2.14 -    return PEP_STATUS_OK;
    2.15 +    return status;
    2.16  }
    2.17  
    2.18  typedef struct _revoke_state {
    2.19 @@ -2127,11 +2130,14 @@
    2.20      gpgme_error = gpg.gpgme_op_edit(session->ctx, key, revoke_fsm, &handle,
    2.21              output);
    2.22      assert(gpgme_error == GPG_ERR_NO_ERROR);
    2.23 +    if(gpgme_error != GPG_ERR_NO_ERROR) {
    2.24 +        status = PEP_CANNOT_EDIT_KEY;
    2.25 +    }
    2.26  
    2.27      gpg.gpgme_data_release(output);
    2.28      gpg.gpgme_key_unref(key);
    2.29  
    2.30 -    return PEP_STATUS_OK;
    2.31 +    return status;
    2.32  }
    2.33  
    2.34  PEP_STATUS pgp_key_expired(