aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/complete.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-07-26 10:55:11 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-07-26 10:55:19 -0700
commitdeacec07bf5acf8b8730d71ef18593f27083fd35 (patch)
treea91d3cc87c0b1c385a273d6c2412e61dc0b35c05 /src/complete.cpp
parent78af59f40cf176c12680ba21ee42575960497951 (diff)
Fix a warning with g++ about an unused function result
Diffstat (limited to 'src/complete.cpp')
-rw-r--r--src/complete.cpp5
1 files changed, 4 insertions, 1 deletions
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'~')
{