Skip to content

Commit 9ef9e5a

Browse files
committed
mod_crypto: Fix warnings about signed bit fields.
The non-zero value for one bit field is -1: mod_crypto.c|565 col 18| error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] || ctx->encrypt = 1; || ^ ~ mod_crypto.c|746 col 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] || ctx->clength = 1; || ^ ~ mod_crypto.c|903 col 35| error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] || ctx->seen_eos = 1; || ^ ~ mod_crypto.c|960 col 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] || ctx->clength = 1; || ^ ~ Use unsigned bit fields for struct crypto_ctx's members seen_eos, encrypt and clength. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916299 13f79535-47bb-0310-9956-ffa450edef68
1 parent fb3dbd7 commit 9ef9e5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/filters/mod_crypto.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ typedef struct crypto_ctx
108108
apr_off_t remaining;
109109
apr_off_t written;
110110
apr_size_t osize;
111-
int seen_eos:1;
112-
int encrypt:1;
113-
int clength:1;
111+
unsigned int seen_eos :1,
112+
encrypt :1,
113+
clength :1;
114114
} crypto_ctx;
115115

116116
static const char *parse_pass_conf_binary(cmd_parms *cmd,

0 commit comments

Comments
 (0)