[PATCH] test: fix uninitialized variable use in T562-lib-database

Subject: [PATCH] test: fix uninitialized variable use in T562-lib-database

Date: Sun, 16 Aug 2020 14:07:42 -0300

To: notmuch@notmuchmail.org

Cc: David Bremner

From: David Bremner


Fix a copy paste error of using the boolean ret as a notmuch_status_t,
and uninitialized.
---
 test/T562-lib-database.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh
index d6097418..dd4f2566 100755
--- a/test/T562-lib-database.sh
+++ b/test/T562-lib-database.sh
@@ -154,11 +154,9 @@ test_expect_equal_file EXPECTED OUTPUT
 test_begin_subtest "upgrade a closed db"
 cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
     {
-        notmuch_bool_t ret;
-
         EXPECT0(notmuch_database_close (db));
         stat = notmuch_database_upgrade (db, NULL, NULL);
-        printf ("%d\n", ret == NOTMUCH_STATUS_SUCCESS);
+        printf ("%d\n", stat == NOTMUCH_STATUS_SUCCESS);
     }
 EOF
 cat <<EOF > EXPECTED
-- 
2.28.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: