remove __warn_unused attribute from exec_subshell

This commit is contained in:
Jan Kanis 2013-02-06 01:11:46 +01:00
parent 9a89da3b33
commit 51a955c75c
3 changed files with 6 additions and 11 deletions

View File

@ -1519,7 +1519,7 @@ int exec_subshell(const wcstring &cmd, std::vector<wcstring> &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);

4
exec.h
View File

@ -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<wcstring> &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<wcstring> &outputs, bool preserve_exit_status);
int exec_subshell(const wcstring &cmd, bool preserve_exit_status);
/**

View File

@ -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