Message ID | 20240922144424.2103551-1-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBCQ4XFG47UFRBTG2YC3QMGQEOH733TI@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2EDE23F14C for <linux-amarula@patchwork.amarulasolutions.com>; Sun, 22 Sep 2024 16:44:29 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5c3c245a8easf2230528a12.1 for <linux-amarula@patchwork.amarulasolutions.com>; Sun, 22 Sep 2024 07:44:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727016269; cv=pass; d=google.com; s=arc-20240605; b=SFrgu3jbGqgeNjnfKR/6gv8hquaa/5kn3HF27rh+vS4eNnZEGzl6Z+xqdO9a03BMEq TGLOJS9A1/fKO6SToO8xb/j0yq+EZcekohRJWO2m6YF+nqBexbQ3JcK4vDjclKApUxLP h3jEEAdmO6izs5pbwhX0cZH8ymUC8HLpS6iMaSQuc9uHEY4/A6UV8Qs0OGG+kBPUZiTt 9EXgojZAlBX33M0+QjPoQoSuL6VeJyVxkHNanKJMAK55vJmf9qmk6h3zb29+HlwhytcC WjtdztFxEEKkyUFK7hCyJBzEiT9pHAYMAMBEU5M2ciaK0v1WDD4+2vUpV02GRa6y+YhA PveQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:to :from:dkim-signature; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; fh=q+9RsmTXlwq3kbWFU0+PHiylM/jnK/D+zbngjR2TBoI=; b=Glx+F6oBdcTBGbZsi6yoe+OD4iW2iY47h3Zz3SK9W1R8G9ZaYxxSYIir2WuA9xq4IS kZ6NNVXDtDXoU6NBXa1Ybz5Ha7+ZAG5F4aKpqVXXk3aGuGQsdnHZkM5oA1pKlI8OxSD0 1ZTqy+7y0ts67jcvtbxCtjtPPRrIAUV7o0MDaO4Z+p9JQUODzcqgCzq1/vu8fKZdqaac WZG+IJafnAktwrVxUt94pqhRnmomIs1GNWlqioS8741OAdSqiYlKmMzxQ9kTMEsIEc49 9o4ylItDiK8t2ymRHTmyPANh/F+8WO0kYgGm0Kg9PXitWBw6DE5lCknUURQffI9BKehj yRvA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=onbabBk1; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727016269; x=1727621069; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:to:from:from :to:cc:subject:date:message-id:reply-to; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; b=b9trGJ+7VOyLvFveztMLARZmzTG/8YPNyEZT4Hjmqpv6pNjPP/FVKYBqk67EPLEEV7 +TE+UHzZpGOgoFUjW1J8If1NOegDG2JpBKroVPyCd2Hr6EE3i8oSjX37lt8hisQUFNVd VJYm/3GB9tLrIp0Lrn77CdS7TsxskZ42fllm4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727016269; x=1727621069; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:to:from:x-beenthere:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; b=hKV8onW4JaE87j7VorjN7DgToUiS/V4oUz4swKClp7MrpjWSIa3z/PSj7GluilEy8B X1g2KS8YLaGpld8fS8A//TiW2BQy/s0GSkT2ljbQl9zFObQFuUW7gJHL5gQjtR++rAvC nEw9pd+QlntomGLp1aI6fSZ2D/M2rvrn+Heiw89h11sQK67fGIXiWMawDOG6OGnkpZve X3p1pjCqbDE92haTf0UYATh81etZmhYGG0C0hvnD7YVJZ0tB/FenFDgt2O7tXlHbGSco QdWgCvIpMOce+9H2aWRiY9YHUWBbzXmZtXOwlbAdYDKhTz95EiYXeXO4nGLFR61xY6Cs 6/4g== X-Forwarded-Encrypted: i=2; AJvYcCWihzrr4R/Pegr06LcDLFrbf56cv4fBE8cqkNJcwmjmNdydSMYjPob0tniihkeS48T+ydB2KtpD3lIstzx2@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yyvny2EcGgjimgvVJg1qb4ptE+wQ5Bv1pjZkyZGzZUEsmXmpB8K Qc2aT2BnUyIoFHp6iC3LzKDYsZxK5aifsWC9fHVdaXY9xHiBGfnLWA9HiMHWaUy7Ww== X-Google-Smtp-Source: AGHT+IE8teWeufoDAxjgkzUsJFyIUoFJImRr6U2345501gzLO9vkhN9WU8yRQ8Q3NQrhDM4aWgfEKw== X-Received: by 2002:a05:6402:278f:b0:5c2:768d:23e with SMTP id 4fb4d7f45d1cf-5c464df330fmr8906882a12.27.1727016268529; Sun, 22 Sep 2024 07:44:28 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:234d:b0:5bf:bf:efe4 with SMTP id 4fb4d7f45d1cf-5c45994f1bfls1493811a12.2.-pod-prod-08-eu; Sun, 22 Sep 2024 07:44:27 -0700 (PDT) X-Received: by 2002:a17:907:3f99:b0:a8d:1655:a423 with SMTP id a640c23a62f3a-a90d58c1046mr1144865566b.56.1727016266831; Sun, 22 Sep 2024 07:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727016266; cv=none; d=google.com; s=arc-20160816; b=J3iYN3jj+a4OOOEV3eyAAydDS658NNhtP+PQd2D9hOucKgviBKabJ/ukjeSv2/pEFX i494MD7Ynb6PcbjS/2SrfEucOxOo6nNHjHpCz+4MlyAATg+ch1TCL7FSOHAbrCrPpSGU 2dqSM2BZ5j4/x5cUYiGrJSdoWDooXEVEuWmaBNeJbGzIxGaZddltMUsSheRfxYqIrfDF nY4P1TOaXEEBwHkOzYRtrdW19gPSxYwHz7aIeUlc0Ao/VzMkCQ4hLfqhGyQbAUuwpS0M qsk92naAseCNwaSzMQIU20bEmdl2lwSfvk+ajNSosC2uFVwUCjxQXA4KxZ9aggxGe0L8 zjYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:dkim-signature; bh=YPYlfu2VkH5W38C/INzwLlNXJPhMZKljvgdLTCWrM5w=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=KEHlN/i6e6NhZ0ihR/Q4DH/q+ZlgPupdFQaYWVqNbyqSPxdKXXcXXhcGabYBz4472M TDbRL82FJweEWBiCTYNOPNU/ibYBWW3IqYWUWW+4c86ozIc/BQy9fFQj2hkpev1aRmeb 4IRL/D87dT7vM8C66TNusoHR6MTIuzDASLAF0hEL3wNXsf2lnVf/4Vlt/yXCOOFei6Ps l4c6Ct0NHjlJ95d8UOtu6qbcSiryw6rcptFMEEZ8f5G6R95c/oOGlwp1pQzgou0TLkst TRajg220DAfdh5QSihAEzj1VerR/kxkux0b6aqfFjCN0zrqXQlXMdLn8y7n8WNLVdTMM pYzw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=onbabBk1; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a90610f56c0sor733907466b.5.2024.09.22.07.44.26 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Sun, 22 Sep 2024 07:44:26 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:907:6e8b:b0:a86:a866:9e26 with SMTP id a640c23a62f3a-a90d55de60fmr1159835966b.3.1727016266046; Sun, 22 Sep 2024 07:44:26 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-20-102-52.retail.telecomitalia.it. [79.20.102.52]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90610968dbsm1090416566b.43.2024.09.22.07.44.25 for <linux-amarula@amarulasolutions.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 07:44:25 -0700 (PDT) From: Dario Binacchi <dario.binacchi@amarulasolutions.com> To: linux-amarula@amarulasolutions.com Subject: [iproute2, RESEND PATCH 1/2] arpd: use designated initializers for msghdr structure Date: Sun, 22 Sep 2024 16:44:23 +0200 Message-ID: <20240922144424.2103551-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=onbabBk1; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
diff --git a/misc/arpd.c b/misc/arpd.c index e77ef53928a2..b4935c23eebb 100644 --- a/misc/arpd.c +++ b/misc/arpd.c @@ -437,10 +437,10 @@ static void get_kern_msg(void) struct iovec iov; char buf[8192]; struct msghdr msg = { - (void *)&nladdr, sizeof(nladdr), - &iov, 1, - NULL, 0, - 0 + .msg_name = &nladdr, .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, .msg_iovlen = 1, + .msg_control = (void *)NULL, .msg_controllen = 0, + .msg_flags = 0 }; iov.iov_base = buf;
This patch fixes the following error: arpd.c:442:17: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 442 | NULL, 0, raised by Buildroot autobuilder [1]. In the case in question, the analysis of socket.h [2] containing the msghdr structure shows that it has been modified with the addition of padding fields, which cause the compilation error. The use of designated initializers allows the issue to be fixed. struct msghdr { void *msg_name; socklen_t msg_namelen; struct iovec *msg_iov; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN int __pad1; #endif int msg_iovlen; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN int __pad1; #endif void *msg_control; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN int __pad2; #endif socklen_t msg_controllen; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN int __pad2; #endif int msg_flags; }; [1] http://autobuild.buildroot.org/results/e4cdfa38ae9578992f1c0ff5c4edae3cc0836e3c/ [2] iproute2/host/mips64-buildroot-linux-musl/sysroot/usr/include/sys/socket.h Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> --- misc/arpd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)