diff --git a/src/builtin_set_color.cpp b/src/builtin_set_color.cpp index 5d6ee22d1..22c9d9d2e 100644 --- a/src/builtin_set_color.cpp +++ b/src/builtin_set_color.cpp @@ -179,6 +179,7 @@ maybe_t builtin_set_color(parser_t &parser, io_streams_t &streams, wchar_t outputter_t outp; if (bold && enter_bold_mode) { + // These casts are needed to work with different curses implementations. writembs_nofail(outp, tparm(const_cast(enter_bold_mode))); } diff --git a/src/event.cpp b/src/event.cpp index 0b11cfcbd..4868c917f 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -387,7 +387,7 @@ void event_print(io_streams_t &streams, maybe_t type_filter) { if (!last_type || *last_type != evt->desc.type) { if (last_type) streams.out.append(L"\n"); - last_type = static_cast(evt->desc.type); + last_type = evt->desc.type; streams.out.append_format(L"Event %ls\n", event_name_for_type(*last_type)); } switch (evt->desc.type) { diff --git a/src/wutil.cpp b/src/wutil.cpp index 6a2de70a1..5fb63abcc 100644 --- a/src/wutil.cpp +++ b/src/wutil.cpp @@ -84,7 +84,7 @@ bool wreaddir_resolving(DIR *dir, const wcstring &dir_path, wcstring &out_name, if (stat(fullpath.c_str(), &buf) != 0) { is_dir = false; } else { - is_dir = static_cast(S_ISDIR(buf.st_mode)); + is_dir = S_ISDIR(buf.st_mode); } } *out_is_dir = is_dir;