Some compilers complain that result might be used uninitialized in
this function. I believe such compilers simply aren't looking hard
enough, but it's easy enough to silence them.
These were copied from the gnulib git repository as of:
commit 563c779682040ed4b89c9b4bbe428dcd8157c90a
They come under the GNU GPL v3 (or later) exactly as notmuch is
licensed.