diff --git a/src/builtin.cpp b/src/builtin.cpp index 126503a6f..932cf1b86 100644 --- a/src/builtin.cpp +++ b/src/builtin.cpp @@ -2015,7 +2015,7 @@ int define_function(parser_t &parser, io_streams_t &streams, const wcstring_list if (sig < 0) { append_format(*out_err, - _(L"%ls: Unknown signal '%ls'\n"), + _(L"%ls: Unknown signal '%ls'"), argv[0], w.woptarg); res=1; @@ -2030,7 +2030,7 @@ int define_function(parser_t &parser, io_streams_t &streams, const wcstring_list if (wcsvarname(w.woptarg)) { append_format(*out_err, - _(L"%ls: Invalid variable name '%ls'\n"), + _(L"%ls: Invalid variable name '%ls'"), argv[0], w.woptarg); res=STATUS_BUILTIN_ERROR; @@ -2083,7 +2083,7 @@ int define_function(parser_t &parser, io_streams_t &streams, const wcstring_list if (job_id == -1) { append_format(*out_err, - _(L"%ls: Cannot find calling job for event handler\n"), + _(L"%ls: Cannot find calling job for event handler"), argv[0]); res=1; } @@ -2101,7 +2101,7 @@ int define_function(parser_t &parser, io_streams_t &streams, const wcstring_list if (errno || !end || *end) { append_format(*out_err, - _(L"%ls: Invalid process id %ls\n"), + _(L"%ls: Invalid process id %ls"), argv[0], w.woptarg); res=1; @@ -2141,7 +2141,7 @@ int define_function(parser_t &parser, io_streams_t &streams, const wcstring_list { if (wcsvarname(w.woptarg)) { - append_format(*out_err, _(L"%ls: Invalid variable name '%ls'\n"), argv[0], w.woptarg); + append_format(*out_err, _(L"%ls: Invalid variable name '%ls'"), argv[0], w.woptarg); res = STATUS_BUILTIN_ERROR; break; } @@ -2190,14 +2190,14 @@ int define_function(parser_t &parser, io_streams_t &streams, const wcstring_list if (name_is_missing) { append_format(*out_err, - _(L"%ls: Expected function name\n"), + _(L"%ls: Expected function name"), argv[0]); res=1; } else if (wcsfuncname(function_name)) { append_format(*out_err, - _(L"%ls: Illegal function name '%ls'\n"), + _(L"%ls: Illegal function name '%ls'"), argv[0], function_name.c_str()); @@ -2207,7 +2207,7 @@ int define_function(parser_t &parser, io_streams_t &streams, const wcstring_list { append_format(*out_err, - _(L"%ls: The name '%ls' is reserved,\nand can not be used as a function name\n"), + _(L"%ls: The name '%ls' is reserved,\nand can not be used as a function name"), argv[0], function_name.c_str()); @@ -2215,7 +2215,7 @@ int define_function(parser_t &parser, io_streams_t &streams, const wcstring_list } else if (function_name.empty()) { - append_format(*out_err, _(L"%ls: No function name given\n"), argv[0]); + append_format(*out_err, _(L"%ls: No function name given"), argv[0]); res=1; } else @@ -2229,7 +2229,7 @@ int define_function(parser_t &parser, io_streams_t &streams, const wcstring_list if (wcsvarname(named_arguments.at(i))) { append_format(*out_err, - _(L"%ls: Invalid variable name '%ls'\n"), + _(L"%ls: Invalid variable name '%ls'"), argv[0], named_arguments.at(i).c_str()); res = STATUS_BUILTIN_ERROR; @@ -2241,9 +2241,9 @@ int define_function(parser_t &parser, io_streams_t &streams, const wcstring_list { // +1 because we already got the function name append_format(*out_err, - _(L"%ls: Expected one argument, got %d\n"), + _(L"%ls: Expected one argument, got %lu"), argv[0], - positionals.size() + 1); + (unsigned long)(positionals.size() + 1)); res=1; } }