Skip to content
Snippets Groups Projects
  • Philippe Mathieu-Daudé's avatar
    5f6d4f79
    crypto/cipher-gnutls.c: Clean up local variable shadowing · 5f6d4f79
    Philippe Mathieu-Daudé authored
    
    Fix:
    
      In file included from crypto/cipher.c:140:
      crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_encrypt’:
      crypto/cipher-gnutls.c.inc:116:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local]
        116 |             int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL);
            |                 ^~~
      crypto/cipher-gnutls.c.inc:94:9: note: shadowed declaration is here
         94 |     int err;
            |         ^~~
           ---
    
      crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_decrypt’:
      crypto/cipher-gnutls.c.inc:177:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local]
        177 |             int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL);
            |                 ^~~
      crypto/cipher-gnutls.c.inc:154:9: note: shadowed declaration is here
        154 |     int err;
            |         ^~~
    
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
    Message-ID: <20230904161235.84651-17-philmd@linaro.org>
    Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    5f6d4f79
    History
    crypto/cipher-gnutls.c: Clean up local variable shadowing
    Philippe Mathieu-Daudé authored
    
    Fix:
    
      In file included from crypto/cipher.c:140:
      crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_encrypt’:
      crypto/cipher-gnutls.c.inc:116:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local]
        116 |             int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL);
            |                 ^~~
      crypto/cipher-gnutls.c.inc:94:9: note: shadowed declaration is here
         94 |     int err;
            |         ^~~
           ---
    
      crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_decrypt’:
      crypto/cipher-gnutls.c.inc:177:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local]
        177 |             int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL);
            |                 ^~~
      crypto/cipher-gnutls.c.inc:154:9: note: shadowed declaration is here
        154 |     int err;
            |         ^~~
    
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
    Message-ID: <20230904161235.84651-17-philmd@linaro.org>
    Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>