diff options
author | Jeffrey C. Ollie <jeff@ocjtech.us> | 2009-11-25 07:01:36 -0600 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-11-27 18:38:06 -0800 |
commit | e991148b00fc683d1591ba27c387c6156d0ee67e (patch) | |
tree | eb9901e173bdc85322bdaafb9a880db3f4e2a0f9 /lib/query.cc | |
parent | c835e2a5059ebc10580f8ae2a79c4f0f81374798 (diff) |
Silence compiler warning by initializing a variable.
If Xapian threw an exception on notmuch_query_count_messages the count
variable could be used uninitialized. Initialize count to solve the
problem.
Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
Diffstat (limited to 'lib/query.cc')
-rw-r--r-- | lib/query.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/query.cc b/lib/query.cc index a571a618..9106b92d 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -315,7 +315,7 @@ notmuch_query_count_messages (notmuch_query_t *query) { notmuch_database_t *notmuch = query->notmuch; const char *query_string = query->query_string; - Xapian::doccount count; + Xapian::doccount count = 0; try { Xapian::Enquire enquire (*notmuch->xapian_db); |