mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 14:29:16 +08:00
remove __warn_unused attribute from exec_subshell
This commit is contained in:
parent
9a89da3b33
commit
51a955c75c
2
exec.cpp
2
exec.cpp
|
@ -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
4
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<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);
|
||||
|
||||
|
||||
/**
|
||||
|
|
11
reader.cpp
11
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user