From 2f3a76c569e5efad54520613315c0d29512ce69c Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 11 May 2011 12:34:13 -0700 Subject: Remove some variables which were set but not used. gcc (at least as of version 4.6.0) is kind enough to point these out to us, (when given -Wunused-but-set-variable explicitly or implicitly via -Wunused or -Wall). One of these cases was a legitimately unused variable. Two were simply variables (named ignored) we were assigning only to squelch a warning about unused function return values. I don't seem to be getting those warnings even without setting the ignored variable. And the gcc docs. say that the correct way to squelch that warning is with a cast to (void) anyway. --- lib/message.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/message.cc') diff --git a/lib/message.cc b/lib/message.cc index ecda75af..a5a65e21 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -213,7 +213,6 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch, { notmuch_message_t *message; Xapian::Document doc; - Xapian::WritableDatabase *db; unsigned int doc_id; char *term; @@ -233,7 +232,6 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch, if (notmuch->mode == NOTMUCH_DATABASE_MODE_READ_ONLY) INTERNAL_ERROR ("Failure to ensure database is writable."); - db = static_cast (notmuch->xapian_db); try { doc.add_term (term, 0); talloc_free (term); -- cgit v1.2.3