From 08c3b332a1cae8a50e797b41053e875e6b3be253 Mon Sep 17 00:00:00 2001 From: Levi Morrison Date: Mon, 2 Oct 2023 22:07:39 -0600 Subject: [PATCH] fix mbstring.c -Wsingle-bit-bitfield-constant-conversion (#12327) These were both local variables, so there isn't much value in using bitfields in the first place. --- ext/mbstring/mbstring.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 3e59806b867..7bf6ef02ee2 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -4202,10 +4202,8 @@ PHP_FUNCTION(mb_send_mail) size_t i; char *to_r = NULL; char *force_extra_parameters = INI_STR("mail.force_extra_parameters"); - struct { - int cnt_type:1; - int cnt_trans_enc:1; - } suppressed_hdrs = { 0, 0 }; + bool suppress_content_type = false; + bool suppress_content_transfer_encoding = false; char *p; enum mbfl_no_encoding; @@ -4288,7 +4286,7 @@ PHP_FUNCTION(mb_send_mail) } } } - suppressed_hdrs.cnt_type = 1; + suppress_content_type = true; } if ((s = zend_hash_str_find(&ht_headers, "content-transfer-encoding", sizeof("content-transfer-encoding") - 1))) { @@ -4308,7 +4306,7 @@ PHP_FUNCTION(mb_send_mail) body_enc = &mbfl_encoding_8bit; break; } - suppressed_hdrs.cnt_trans_enc = 1; + suppress_content_transfer_encoding = true; } /* To: */ @@ -4393,7 +4391,7 @@ PHP_FUNCTION(mb_send_mail) empty = false; } - if (!suppressed_hdrs.cnt_type) { + if (!suppress_content_type) { if (!empty) { smart_str_appendl(&str, line_sep, line_sep_len); } @@ -4407,7 +4405,7 @@ PHP_FUNCTION(mb_send_mail) empty = false; } - if (!suppressed_hdrs.cnt_trans_enc) { + if (!suppress_content_transfer_encoding) { if (!empty) { smart_str_appendl(&str, line_sep, line_sep_len); }