[WIP] Fix clang analysis warnings. (3)

Continues #1389 and #1431.

Fixes **4** warnings in:
- option.c
- quickfix.c
- regexp_nfa.c
- search.c

I will be adding more to this PR until 15 warnings are fixed.