From patchwork Wed Jun 29 05:02:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 641834 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rfVtm6qJwz9sf9 for ; Wed, 29 Jun 2016 15:03:28 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=wL0Wnm7R; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 8E94410980; Tue, 28 Jun 2016 22:02:52 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id CC2CA1091C for ; Tue, 28 Jun 2016 22:02:47 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id 5C6F71E04BD for ; Tue, 28 Jun 2016 23:02:47 -0600 (MDT) X-ASG-Debug-ID: 1467176566-09eadd73990e940001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id SduWJyXNZ6dQi5WW (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 28 Jun 2016 23:02:46 -0600 (MDT) X-Barracuda-Envelope-From: u9012063@gmail.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mail-pa0-f66.google.com) (209.85.220.66) by mx1-pf2.cudamail.com with ESMTPS (AES128-SHA encrypted); 29 Jun 2016 05:02:46 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at _netblocks.google.com designates 209.85.220.66 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.85.220.66 X-Barracuda-RBL-IP: 209.85.220.66 Received: by mail-pa0-f66.google.com with SMTP id hf6so3425677pac.2 for ; Tue, 28 Jun 2016 22:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=eeJjYXXDuMzdxGSBAVA+xNHEHuvH7bn4duUwsM2hFTY=; b=wL0Wnm7RNjXNivpdPSFJwJIKa2iElLHxtUs0vZnuOjDxctRnaG0oF4tO5G+FEmOpcz pn8ZyYsI5+Zvvw0xM74w/y32KJuH5OcJbzLs3jXdwYBETI607lM/FyAkSKGbDLXkH6rJ ZbSrv/o3aLr77cV6Ar8z9Hj5gtVoSDIzKx9sNnOtb2wkemt0QWde5d/HmmltVsQwDS7S wN3VFuKCYhZM9mbgcE0YZVtt9JA+NYs7vRiFlwrx128rlO+ukVBXM6t0IX+h84dzdi28 CjUcZJt+OALGZhOezw537TMjG0QAs/Gk2KGd0XIpefffu31HR8AAlpRAdEgB4nk/5VUD pUeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=eeJjYXXDuMzdxGSBAVA+xNHEHuvH7bn4duUwsM2hFTY=; b=m3BntuFR95XZD4BaU1hX/oIaoLrZAO9RSgB4ERSDqhqzjahl/dgsgS7NwGTXnslMG5 ZnzJGYkUCZkb4Td2JA46rGt8zjIfVcQmQE8gIRWRwFg9N8BttYOiWAH2J8IvmTrVkuIJ DOZrIU+eJ9WeQDFintQ4j2KtnTzcdaNfhh6Y1jEHM0RycyAoANEMCTJIzUgyvrII4tfc S6LqPxKWSzmoQJYTGtcihGVtIzitJiy2FLVNyFUHIzXsaz91eSxcIZtFwgGI0knJesh4 cZy5RT5SUx5K0KjBwK76lrA4qBFOzdr9oMyfhF1wOFCmNBkRWwa2DzqUZoXed1r8lmNI Aaxg== X-Gm-Message-State: ALyK8tJnmkL4k0Sfol3QWx4t+9C89SJpeSSMI5JVqcTHcCGwcJyYr8iizS+nzHcOlbHgYg== X-Received: by 10.66.86.103 with SMTP id o7mr8372781paz.5.1467176565977; Tue, 28 Jun 2016 22:02:45 -0700 (PDT) Received: from vm-dev.localdomain ([76.126.157.223]) by smtp.gmail.com with ESMTPSA id y70sm1857417pff.25.2016.06.28.22.02.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jun 2016 22:02:45 -0700 (PDT) X-CudaMail-Envelope-Sender: u9012063@gmail.com From: William Tu To: dev@openvswitch.org X-CudaMail-MID: CM-E2-627099887 X-CudaMail-DTE: 062816 X-CudaMail-Originating-IP: 209.85.220.66 Date: Tue, 28 Jun 2016 22:02:28 -0700 X-ASG-Orig-Subj: [##CM-E2-627099887##][PATCH 7/7] ovsdb: Fix dead assignment reported by clang. Message-Id: <1467176548-40488-8-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1467176548-40488-1-git-send-email-u9012063@gmail.com> References: <1467176548-40488-1-git-send-email-u9012063@gmail.com> X-GBUdb-Analysis: 0, 209.85.220.66, Ugly c=0.331706 p=-0.28 Source Normal X-MessageSniffer-Rules: 0-0-0-4265-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1467176566 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, DKIM_SIGNED, MAILTO_TO_SPAM_ADDR, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.30853 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.00 MAILTO_TO_SPAM_ADDR URI: Includes a link to a likely spammer email 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH 7/7] ovsdb: Fix dead assignment reported by clang. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Clang reports variable 'error' never been used. Fix by returning error when table_update->type != JSON_OBJECT. Signed-off-by: William Tu --- ovsdb/replication.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovsdb/replication.c b/ovsdb/replication.c index 3d1bc33..a5f94da 100644 --- a/ovsdb/replication.c +++ b/ovsdb/replication.c @@ -470,6 +470,7 @@ process_table_update(struct json *table_update, const char *table_name, if (table_update->type != JSON_OBJECT) { error = ovsdb_error("Not a JSON object", " for table is not object"); + return error; } table = ovsdb_get_table(database, table_name);