From 51a955c75c11995b7d7816b777b67eea08e6105a Mon Sep 17 00:00:00 2001 From: Jan Kanis Date: Wed, 6 Feb 2013 01:11:46 +0100 Subject: remove __warn_unused attribute from exec_subshell --- exec.cpp | 2 +- exec.h | 4 ++-- reader.cpp | 11 +++-------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/exec.cpp b/exec.cpp index 33e2daac..7fc94b0c 100644 --- a/exec.cpp +++ b/exec.cpp @@ -1519,7 +1519,7 @@ int exec_subshell(const wcstring &cmd, std::vector &outputs, bool appl return exec_subshell_internal(cmd, &outputs, apply_exit_status); } -__warn_unused int exec_subshell(const wcstring &cmd, bool apply_exit_status) +int exec_subshell(const wcstring &cmd, bool apply_exit_status) { ASSERT_IS_MAIN_THREAD(); return exec_subshell_internal(cmd, NULL, apply_exit_status); diff --git a/exec.h b/exec.h index 9a9d2dc5..edae1e55 100644 --- a/exec.h +++ b/exec.h @@ -54,8 +54,8 @@ void exec(parser_t &parser, job_t *j); \return the status of the last job to exit, or -1 if en error was encountered. */ -__warn_unused int exec_subshell(const wcstring &cmd, std::vector &outputs, bool preserve_exit_status); -__warn_unused int exec_subshell(const wcstring &cmd, bool preserve_exit_status); +int exec_subshell(const wcstring &cmd, std::vector &outputs, bool preserve_exit_status); +int exec_subshell(const wcstring &cmd, bool preserve_exit_status); /** diff --git a/reader.cpp b/reader.cpp index 99a9c251..92d0aa52 100644 --- a/reader.cpp +++ b/reader.cpp @@ -770,10 +770,8 @@ static void exec_prompt() if (! data->left_prompt.empty()) { wcstring_list_t prompt_list; - if (exec_subshell(data->left_prompt, prompt_list, apply_exit_status)) - { - // returned status value is ignored - } + // ignore return status + exec_subshell(data->left_prompt, prompt_list, apply_exit_status); for (size_t i = 0; i < prompt_list.size(); i++) { if (i > 0) data->left_prompt_buff += L'\n'; @@ -785,10 +783,7 @@ static void exec_prompt() { wcstring_list_t prompt_list; // status is ignored - if (exec_subshell(data->right_prompt, prompt_list, apply_exit_status)) - { - // returned status value is ignored - } + exec_subshell(data->right_prompt, prompt_list, apply_exit_status); for (size_t i = 0; i < prompt_list.size(); i++) { // Right prompt does not support multiple lines, so just concatenate all of them -- cgit v1.2.3