Skip to content

Silence compiler warnings in ext/sockets/conversions.c #10974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ext/sockets/conversions.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ static void from_zval_write_sockaddr_aux(const zval *container,
&& Z_TYPE_P(elem) != IS_NULL) {
const char *node = "family";
zend_llist_add_element(&ctx->keys, &node);
family = 0; /* Silence compiler warning */
from_zval_write_int(elem, (char*)&family, ctx);
zend_llist_remove_tail(&ctx->keys);

Expand Down Expand Up @@ -1121,7 +1122,7 @@ static void from_zval_write_iov_array(const zval *arr, char *msghdr_c, ser_conte
static void from_zval_write_controllen(const zval *elem, char *msghdr_c, ser_context *ctx)
{
struct msghdr *msghdr = (struct msghdr *)msghdr_c;
uint32_t len;
uint32_t len = 0; /* Silence compiler warning */

/* controllen should be an unsigned with at least 32-bit. Let's assume
* this least common denominator
Expand Down