mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 20:16:12 +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);
|
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();
|
ASSERT_IS_MAIN_THREAD();
|
||||||
return exec_subshell_internal(cmd, NULL, apply_exit_status);
|
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.
|
\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);
|
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, bool preserve_exit_status);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
11
reader.cpp
11
reader.cpp
|
@ -770,10 +770,8 @@ static void exec_prompt()
|
||||||
if (! data->left_prompt.empty())
|
if (! data->left_prompt.empty())
|
||||||
{
|
{
|
||||||
wcstring_list_t prompt_list;
|
wcstring_list_t prompt_list;
|
||||||
if (exec_subshell(data->left_prompt, prompt_list, apply_exit_status))
|
// ignore return status
|
||||||
{
|
exec_subshell(data->left_prompt, prompt_list, apply_exit_status);
|
||||||
// returned status value is ignored
|
|
||||||
}
|
|
||||||
for (size_t i = 0; i < prompt_list.size(); i++)
|
for (size_t i = 0; i < prompt_list.size(); i++)
|
||||||
{
|
{
|
||||||
if (i > 0) data->left_prompt_buff += L'\n';
|
if (i > 0) data->left_prompt_buff += L'\n';
|
||||||
|
@ -785,10 +783,7 @@ static void exec_prompt()
|
||||||
{
|
{
|
||||||
wcstring_list_t prompt_list;
|
wcstring_list_t prompt_list;
|
||||||
// status is ignored
|
// status is ignored
|
||||||
if (exec_subshell(data->right_prompt, prompt_list, apply_exit_status))
|
exec_subshell(data->right_prompt, prompt_list, apply_exit_status);
|
||||||
{
|
|
||||||
// returned status value is ignored
|
|
||||||
}
|
|
||||||
for (size_t i = 0; i < prompt_list.size(); i++)
|
for (size_t i = 0; i < prompt_list.size(); i++)
|
||||||
{
|
{
|
||||||
// Right prompt does not support multiple lines, so just concatenate all of them
|
// Right prompt does not support multiple lines, so just concatenate all of them
|
||||||
|
|
Loading…
Reference in New Issue
Block a user