From patchwork Mon Sep 9 04:54:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Pattrick X-Patchwork-Id: 1982306 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=K3Xhrcul; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X2Dzc09q4z1y1l for ; Mon, 9 Sep 2024 14:55:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5518F80FD8; Mon, 9 Sep 2024 04:55:19 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id uOE054CTREVj; Mon, 9 Sep 2024 04:55:18 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4AF1880FB3 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=K3Xhrcul Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 4AF1880FB3; Mon, 9 Sep 2024 04:55:18 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 13317C0012; Mon, 9 Sep 2024 04:55:18 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id E28E1C0011 for ; Mon, 9 Sep 2024 04:55:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id BC3FC402B3 for ; Mon, 9 Sep 2024 04:55:15 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Xn-8Qaw240JE for ; Mon, 9 Sep 2024 04:55:15 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=mkp@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org D12A3403DC Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D12A3403DC Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=K3Xhrcul Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id D12A3403DC for ; Mon, 9 Sep 2024 04:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725857713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AH2G4o4KPYmckK6qmXKAI/Z4V1nUcPTAaOon2RavHt8=; b=K3Xhrcul5nhMBpBoUOIZzAVP7HkD0EDmhE5QGi012UON9Dtojx50UTWmEXJVXu3GNLNuSH qoGxX5Ifzhkg6cIX8smcV417sYZAXo022yZI5TH9qftSodNEW27eVRF1WpuFQo7ylj8GdK gK7NX58pud9kzEYolLKN0pjxZNU9ujk= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-85-cGAAyAaFN1iVN4CfEMQGBQ-1; Mon, 09 Sep 2024 00:55:12 -0400 X-MC-Unique: cGAAyAaFN1iVN4CfEMQGBQ-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2779D19560A2 for ; Mon, 9 Sep 2024 04:55:11 +0000 (UTC) Received: from mpattric.remote.csb (unknown [10.22.9.170]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 22D2D1956048; Mon, 9 Sep 2024 04:55:08 +0000 (UTC) From: Mike Pattrick To: dev@openvswitch.org Date: Mon, 9 Sep 2024 00:54:57 -0400 Message-ID: <20240909045505.236657-1-mkp@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v3 0/8] Address clang analyze warnings. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This series addresses some warnings produced by clang analyze, and reduces the total number of warnings down from 51 to 30. Asside from the theme of reducing clang analyze warnings, the individual patches aren't directly related to each other. Mike Pattrick (8): ovsdb-error: Annotate non-null functions. dpif-netdev: Remove undefined integer division. jsonrpc: Don't access ovs_list members directly. netlink-socket: Initialize socket family. classifier: Store n_indices between usage. vconn: Always properly free flow stats reply. mcast-snooping: Properly check group_get_lru return code. mcast-snooping: Don't access ovs_list members directly. lib/classifier.c | 12 ++++++++---- lib/dpif-netdev.c | 12 +++++++----- lib/jsonrpc.c | 5 +++-- lib/mcast-snooping.c | 8 +++++--- lib/netlink-socket.c | 1 + lib/ovsdb-error.h | 15 ++++++++++----- lib/vconn.c | 6 +++++- 7 files changed, 39 insertions(+), 20 deletions(-)