From deacec07bf5acf8b8730d71ef18593f27083fd35 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 26 Jul 2015 10:55:11 -0700 Subject: Fix a warning with g++ about an unused function result --- src/complete.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/complete.cpp') diff --git a/src/complete.cpp b/src/complete.cpp index 1f3cc656..1fd729c4 100644 --- a/src/complete.cpp +++ b/src/complete.cpp @@ -1150,7 +1150,10 @@ void completer_t::complete_cmd(const wcstring &str_cmd, bool use_function, bool } if (use_implicit_cd) { - (void)expand_string(str_cmd, this->completions, ACCEPT_INCOMPLETE | DIRECTORIES_ONLY | this->expand_flags(), NULL); + if (!expand_string(str_cmd, this->completions, ACCEPT_INCOMPLETE | DIRECTORIES_ONLY | this->expand_flags(), NULL)) + { + // Not valid as implicit cd. + } } if (str_cmd.find(L'/') == wcstring::npos && str_cmd.at(0) != L'~') { -- cgit v1.2.3