From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id D61F16DE0C6D for ; Fri, 16 Jun 2017 15:50:43 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.064 X-Spam-Level: X-Spam-Status: No, score=-0.064 tagged_above=-999 required=5 tests=[AWL=0.247, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.211, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ypZw7Z6Ep228 for ; Fri, 16 Jun 2017 15:50:42 -0700 (PDT) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by arlo.cworth.org (Postfix) with ESMTPS id 900E76DE0927 for ; Fri, 16 Jun 2017 15:50:37 -0700 (PDT) Received: by mail-wr0-f193.google.com with SMTP id z45so7808051wrb.2 for ; Fri, 16 Jun 2017 15:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8SgLAHun4U/IXQXaO2G/Y5n88sM5rBdUEY098qB+A8g=; b=pyDR+yaGNxdZKwOJt1oflo2eKtLAg4gmRYe0CapNgpu2izsjgYFnuUWDE6q30vJr2t W6dsAXwRAQZ4K+cdwc4hG9jY9yKXGUr0rxqS1q6pS8fmYKHnAlWrhwHMxrwZL2FNgH4o KjmDz4c/nYnTYr73KvIWFWEavJLCvmzmqMV7LV3fKYx9G/7LLcFde3x0plFcNc/OtanR Dk8LNxANIe8Hb1k8S9us6zg5XxWq2EYaGgHh5g6+CNFpMGR5tltc5YkQKHvjC/c/ztX/ qLkpRWAyNSC3AUSqbeZBrJtkz76hyOT2hdR8YtcKpWbBrlG8Q9AKjN/J7S7uj9zbUlEv 0h3g== 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:in-reply-to :references; bh=8SgLAHun4U/IXQXaO2G/Y5n88sM5rBdUEY098qB+A8g=; b=mMQhfYDSzB/2neDi+ytgatUBGzRmeHZzjaKXsNSSQIlIzrUNNdYpBdgiO3OOpVbh5H hlr72N8IpPmoGe3lsMGAskx3P548p7e7yMhH2yWja5l951MvXCNKaWMBvXNCkIGpEiZp 28N5uPnIBaciJoNAUUZZlCrbYnx2A11yeq0Ha5F6cZ+5cl/hc2BZyXhaUjgI4/jj2WXQ F8JJr2dhxOR5ZbO/R9qcTZMEzrZK1Sy7CHmWP5FnjOxa0yTkMVOoVXDBxAay5p0iUz4x ffOVnwvhk+RGIc/z6Ue9NwJPsDxKxm3cE9b/HCf6+XsA+xPBk6rtU3kyPjashg7yC/BA MsGA== X-Gm-Message-State: AKS2vOw+RSBrb42a+FLt6hDQ2nLdsu5LccagjF/ixPokUU0G2LZDXIIr G4MXHEoO0hzRi1Br X-Received: by 10.223.177.158 with SMTP id q30mr8856917wra.82.1497653436036; Fri, 16 Jun 2017 15:50:36 -0700 (PDT) Received: from sparkmobile.lan (209.166.93.209.dyn.plus.net. [209.93.166.209]) by smtp.gmail.com with ESMTPSA id y17sm4441851wrb.39.2017.06.16.15.50.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Jun 2017 15:50:35 -0700 (PDT) From: Piotr Trojanek To: notmuch@notmuchmail.org Subject: [PATCH 5/5] flag potential problems with FIXME Date: Fri, 16 Jun 2017 23:50:26 +0100 Message-Id: <20170616225026.8098-5-piotr.trojanek@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170616225026.8098-1-piotr.trojanek@gmail.com> References: <20170616225026.8098-1-piotr.trojanek@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jun 2017 22:50:44 -0000 Detected by cppcheck. --- lib/directory.cc | 1 + lib/string-map.c | 1 + 2 files changed, 2 insertions(+) diff --git lib/directory.cc lib/directory.cc index 5de3319c..801f1e5b 100644 --- lib/directory.cc +++ lib/directory.cc @@ -302,6 +302,7 @@ notmuch_directory_delete (notmuch_directory_t *directory) "A Xapian exception occurred deleting directory entry: %s.\n", error.get_msg().c_str()); directory->notmuch->exception_reported = TRUE; + /* FIXME: Variable 'status' is assigned a value that is never used. */ status = NOTMUCH_STATUS_XAPIAN_EXCEPTION; } notmuch_directory_destroy (directory); diff --git lib/string-map.c lib/string-map.c index 0bb77e93..11c0a644 100644 --- lib/string-map.c +++ lib/string-map.c @@ -122,6 +122,7 @@ bsearch_first (notmuch_string_pair_t *array, size_t len, const char *key, notmuc size_t last = len - 1; size_t mid; + /* FIXME: Checking if unsigned variable 'len' is less than zero. */ if (len <= 0) return NULL; -- 2.11.0