From patchwork Thu Dec 5 13:19:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 11274715 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19B54138D for ; Thu, 5 Dec 2019 13:20:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB5AF20675 for ; Thu, 5 Dec 2019 13:20:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575552009; bh=h82NDLmT1GjnxXu5eK5Ouc22/i7NLz30rcFSu5V2t5M=; h=From:To:Cc:Subject:Date:List-ID:From; b=T+s9ZHumPzDXpkp2/5hFvb1J8253D1R6Vinu2IBVg6P+S9DehEfJaSUX8Cu8THncK yGIMNpETBfKPEg+n9enIzYIxrcdvEkP66ruXpf3Mjg9iDwrZFH/zQd4318gflLiTic cZDQ3wbZ0Ba1LciOrjKQLF0QwOrHOWN1VgLKGTLs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729559AbfLENUI (ORCPT ); Thu, 5 Dec 2019 08:20:08 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:44519 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729240AbfLENUH (ORCPT ); Thu, 5 Dec 2019 08:20:07 -0500 Received: by mail-wr1-f66.google.com with SMTP id q10so3522434wrm.11 for ; Thu, 05 Dec 2019 05:20:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BhNSvshV1QHjnGrVTRNJP1wQhxjefRuxjTs1qrT/8cw=; b=GO6FTfG3JtqgZe9repB8EE7NULIjwcvuZNtO7HUkofK33N8hlGTaoTpPrsrBqmjB30 Pa6P1d0YTL7vXQtphIvOfVNePQawr3QWqUNrcT4QCm5w18DWe51wc45RRijWy10nude0 cmNwyN+RllQhUjgGZWS6jkPYwbOSXf0hw/u8520ycBBwDlYX307syIVZOFguhgD+FLyr Tvik429vbhJ4/wQwmOYGbYXA2RnOL3TL3rMHTPPAFXhdGuHq67ScNDTPRtnk7dECpbst 3XWKWR0uJei8xIfmJNZfM7XU4ypkKArLw/OhoR0SmbfPL7vOTsDnwTAXYvWyPp6BQlSt Dqbw== X-Gm-Message-State: APjAAAWqgO2gx2H1y3mRFEgkzlMYA7+faxLkvVYyWQ9XZpVfO/A1HNMK OlRyM7odjpJTneghV3CbjUc= X-Google-Smtp-Source: APXvYqwIZFDITmec+A6ywZHsf8eMJXXhvUqlGDW2ZsCtm7W+kudZhx2zE8jB5rBxXxsgd8Kd+TCtyg== X-Received: by 2002:adf:e6cb:: with SMTP id y11mr10380477wrm.345.1575552005683; Thu, 05 Dec 2019 05:20:05 -0800 (PST) Received: from localhost.localdomain (ppp-46-244-194-187.dynamic.mnet-online.de. [46.244.194.187]) by smtp.gmail.com with ESMTPSA id f67sm10482515wme.16.2019.12.05.05.20.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Dec 2019 05:20:04 -0800 (PST) From: Johannes Thumshirn To: David Sterba Cc: Linux BTRFS Mailinglist , Johannes Thumshirn Subject: [PATCH 0/3] Misc fixes silencing false positives from cppcheck Date: Thu, 5 Dec 2019 14:19:56 +0100 Message-Id: <20191205131959.19184-1-jth@kernel.org> X-Mailer: git-send-email 2.21.0 (Apple Git-122) MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org misc fixes provoked by https://bugzilla.kernel.org/show_bug.cgi?id=205003 The first patch removes an unneeded variable, which when removed silences a false positive warning generated by cppcheck. The second patch removes a BUG_ON() which can't be hit, for the same reasons as there can't be no NULL-pointer dereference in patch 1. Patch number three removes a WARN_ON() which can't be triggered. This WARN_ON() was also identified as a possible NULL-pointer dereference by cppcheck. Johannes Thumshirn (3): btrfs: fix possible NULL-pointer dereference in integrity checks btrfs: remove superfluous BUG_ON() in integrity checks btrfs: remove impossible WARN_ON in btrfs_destroy_dev_replace_tgtdev() fs/btrfs/check-integrity.c | 4 +--- fs/btrfs/volumes.c | 1 - 2 files changed, 1 insertion(+), 4 deletions(-)