diff --git a/src/common.cpp b/src/common.cpp index 96873f17a..06192c7fc 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -205,8 +205,7 @@ bool is_windows_subsystem_for_linux() { #ifdef HAVE_BACKTRACE_SYMBOLS // This function produces a stack backtrace with demangled function & method names. It is based on // https://gist.github.com/fmela/591333 but adapted to the style of the fish project. -[[gnu::noinline]] static const wcstring_list_t demangled_backtrace(int max_frames, - int skip_levels) { +[[gnu::noinline]] static wcstring_list_t demangled_backtrace(int max_frames, int skip_levels) { void *callstack[128]; const int n_max_frames = sizeof(callstack) / sizeof(callstack[0]); int n_frames = backtrace(callstack, n_max_frames); diff --git a/src/complete.cpp b/src/complete.cpp index 2707931fd..ed144cca5 100644 --- a/src/complete.cpp +++ b/src/complete.cpp @@ -104,7 +104,7 @@ typedef struct complete_entry_opt { // Completion flags. complete_flags_t flags; - const wcstring localized_desc() const { return C_(desc); } + wcstring localized_desc() const { return C_(desc); } size_t expected_dash_count() const { switch (this->type) { diff --git a/src/wutil.cpp b/src/wutil.cpp index 9f21f3131..ea7bdf694 100644 --- a/src/wutil.cpp +++ b/src/wutil.cpp @@ -130,7 +130,7 @@ bool wreaddir_for_dirs(DIR *dir, wcstring *out_name) { return result != nullptr; } -const wcstring wgetcwd() { +wcstring wgetcwd() { char cwd[PATH_MAX]; char *res = getcwd(cwd, sizeof(cwd)); if (res) { diff --git a/src/wutil.h b/src/wutil.h index 8a3b74cd4..636eff347 100644 --- a/src/wutil.h +++ b/src/wutil.h @@ -71,7 +71,7 @@ void safe_perror(const char *message); const char *safe_strerror(int err); /// Wide character version of getcwd(). -const wcstring wgetcwd(); +wcstring wgetcwd(); /// Wide character version of realpath function. /// \returns the canonicalized path, or none if the path is invalid.