From af66b9b7203a22e6029872513c59a7284f381cf9 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Wed, 7 Jun 2023 03:46:43 +0900 Subject: [ruby/openssl] pkey: use unsigned type for bit fields clang generates a warning: ../../../../ext/openssl/ossl_pkey.c:326:22: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] arg->interrupted = 1; ^ ~ 1 error generated. https://github.com/ruby/openssl/commit/4b2ba7b022 --- ext/openssl/ossl_pkey.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c index a5baa21820..9caeb5622a 100644 --- a/ext/openssl/ossl_pkey.c +++ b/ext/openssl/ossl_pkey.c @@ -276,9 +276,9 @@ struct pkey_blocking_generate_arg { EVP_PKEY_CTX *ctx; EVP_PKEY *pkey; int state; - int yield: 1; - int genparam: 1; - int interrupted: 1; + unsigned int yield: 1; + unsigned int genparam: 1; + unsigned int interrupted: 1; }; static VALUE -- cgit v1.2.3