[PATCH 5/5] flag potential problems with FIXME
Piotr Trojanek
piotr.trojanek at gmail.com
Fri Jun 16 15:50:26 PDT 2017
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
More information about the notmuch
mailing list