From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 826115A061B; Fri, 25 Oct 2024 01:04:38 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 7/8] udp: Take care of cert-int09-c clang-tidy warning for enum udp_iov_idx Date: Fri, 25 Oct 2024 01:04:37 +0200 Message-ID: <20241024230438.3192725-8-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241024230438.3192725-1-sbrivio@redhat.com> References: <20241024230438.3192725-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: GSUVAOPNTDCG2CWZQ57ROBPLP6FQV4AH X-Message-ID-Hash: GSUVAOPNTDCG2CWZQ57ROBPLP6FQV4AH X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: /home/sbrivio/passt/udp.c:171:1: error: inital values in enum 'udp_iov_idx' are not consistent, consider explicit initialization of all, none or only the first enumerator [cert-int09-c,readability-enum-initial-value,-warnings-as-errors] 171 | enum udp_iov_idx { | ^ 172 | UDP_IOV_TAP = 0, 173 | UDP_IOV_ETH = 1, 174 | UDP_IOV_IP = 2, 175 | UDP_IOV_PAYLOAD = 3, 176 | UDP_NUM_IOVS | | = 4 Make sure we initialise all the values, in this case. Signed-off-by: Stefano Brivio --- udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udp.c b/udp.c index 100610f..89f2959 100644 --- a/udp.c +++ b/udp.c @@ -173,7 +173,7 @@ enum udp_iov_idx { UDP_IOV_ETH = 1, UDP_IOV_IP = 2, UDP_IOV_PAYLOAD = 3, - UDP_NUM_IOVS + UDP_NUM_IOVS = UDP_IOV_PAYLOAD + 1, }; /* IOVs and msghdr arrays for receiving datagrams from sockets */ -- 2.43.0