From patchwork Tue Oct 18 17:17:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Borzenkov X-Patchwork-Id: 120468 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 29F09B71C0 for ; Wed, 19 Oct 2011 04:18:27 +1100 (EST) Received: from localhost ([::1]:44563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGDIz-0006QQ-58 for incoming@patchwork.ozlabs.org; Tue, 18 Oct 2011 13:18:21 -0400 Received: from eggs.gnu.org ([140.186.70.92]:46300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGDIs-0006Q9-QQ for qemu-devel@nongnu.org; Tue, 18 Oct 2011 13:18:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGDIo-0007LG-J0 for qemu-devel@nongnu.org; Tue, 18 Oct 2011 13:18:14 -0400 Received: from mail-bw0-f45.google.com ([209.85.214.45]:61941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGDIo-00078p-DZ; Tue, 18 Oct 2011 13:18:10 -0400 Received: by mail-bw0-f45.google.com with SMTP id t2so1174951bka.4 for ; Tue, 18 Oct 2011 10:18:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=y3mSGrcC7/oKgIeJz/PqNVufqZTtQEuW8h/o6+6RQOU=; b=vOApeJxh8PH8Y2FOin2eUAkcAL/Ou+qWV2ShdJREkYreyFFEAX3YpdY8BoOXrSht6t 04I9AnpWYiiK3PjeHpD/+oLhvH5qjhfPnnmZbsidlcAn+NyGWh2ujvMqk3mMNGur2YmZ SqlsJSKdYJPIWCoT04LeR7cQFRsfKpNPHJgZ4= Received: by 10.204.129.193 with SMTP id p1mr2489964bks.19.1318958289977; Tue, 18 Oct 2011 10:18:09 -0700 (PDT) Received: from localhost.localdomain (ppp83-237-3-205.pppoe.mtu-net.ru. [83.237.3.205]) by mx.google.com with ESMTPS id j9sm2939801bkd.2.2011.10.18.10.18.07 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Oct 2011 10:18:08 -0700 (PDT) From: Pavel Borzenkov To: qemu-devel@nongnu.org Date: Tue, 18 Oct 2011 21:17:56 +0400 Message-Id: <1318958276-14049-1-git-send-email-pavel.borzenkov@gmail.com> X-Mailer: git-send-email 1.7.7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.45 Cc: qemu-trivial@nongnu.org Subject: [Qemu-devel] [PATCH] qed: remove unneeded variable assignment X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 'ret' is unconditionally overwitten by qed_read_l1_table_sync() Spotted by Clang Analyzer Signed-off-by: Pavel Borzenkov --- block/qed.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block/qed.c b/block/qed.c index e87dc4d..c3e45af 100644 --- a/block/qed.c +++ b/block/qed.c @@ -388,7 +388,6 @@ static int bdrv_qed_open(BlockDriverState *bs, int flags) if (ret < 0) { return ret; } - ret = 0; /* ret should always be 0 or -errno */ qed_header_le_to_cpu(&le_header, &s->header); if (s->header.magic != QED_MAGIC) {