fish: Fix remaining build failures under Clang

This commit is contained in:
Kamil Rytarowski 2017-10-22 01:14:26 +02:00
parent ebfbe4d847
commit 6da24e5f55
3 changed files with 60 additions and 1 deletions

View File

@ -9,6 +9,7 @@ SHA1 (patch-configure.ac) = 862b6cef9e269531924965ce928031e063aa90ba
SHA1 (patch-src_builtin.cpp) = b48a52d45ba545a92043e58dc554305670c7fcfc
SHA1 (patch-src_fallback.cpp) = 4a35401ed0d3c3a912e448d56c9375801c919fbc
SHA1 (patch-src_fallback.h) = 87537e6f5be2fa1b8a196d67eb21e6b48380cabb
SHA1 (patch-src_output.cpp) = 139e77063bb3eadec205dceeaa6bbd0da8de97b6
SHA1 (patch-src_output.cpp) = 36a2cc0576aca6585090a1b5b32aa39c90ed3996
SHA1 (patch-src_output.h) = 8e72aefbd940450fb69f4b970ce1d151f17eb48a
SHA1 (patch-src_screen.cpp) = f2d5e10dff9d09e985a8e27a8f2066dcfb58db05
SHA1 (patch-src_wutil.cpp) = dbb73cf81d850c4b73598d0c711f68b0d74cabd6

View File

@ -11,3 +11,12 @@ $NetBSD$
if (term_supports_color_natively(idx)) {
// Use tparm to emit color escape.
writembs(tparm(todo, idx));
@@ -550,7 +550,7 @@ rgb_color_t parse_color(const wcstring &
}
/// Write specified multibyte string.
-void writembs_check(char *mbs, const char *mbs_name, const char *file, long line) {
+void writembs_check(const char *mbs, const char *mbs_name, const char *file, long line) {
if (mbs != NULL) {
tputs(mbs, 1, &writeb);
} else {

View File

@ -0,0 +1,49 @@
$NetBSD$
--- src/screen.cpp.orig 2017-06-03 12:45:13.000000000 +0000
+++ src/screen.cpp
@@ -215,7 +215,7 @@ static bool is_color_escape_seq(const wc
// Detect these terminfo color escapes with parameter value up to max_colors, all of which
// don't move the cursor.
- char *const esc[] = {
+ const char *const esc[] = {
set_a_foreground, set_a_background, set_foreground, set_background,
};
@@ -238,7 +238,7 @@ static bool is_color_escape_seq(const wc
/// displayed other than the color.
static bool is_visual_escape_seq(const wchar_t *code, size_t *resulting_length) {
if (!cur_term) return false;
- char *const esc2[] = {
+ const char *const esc2[] = {
enter_bold_mode, exit_attribute_mode, enter_underline_mode, exit_underline_mode,
enter_standout_mode, exit_standout_mode, flash_screen, enter_subscript_mode,
exit_subscript_mode, enter_superscript_mode, exit_superscript_mode, enter_blink_mode,
@@ -506,7 +506,7 @@ static void s_move(screen_t *s, data_buf
int i;
int x_steps, y_steps;
- char *str;
+ const char *str;
/*
debug( 0, L"move from %d %d to %d %d",
s->screen_cursor[0], s->screen_cursor[1],
@@ -540,7 +540,7 @@ static void s_move(screen_t *s, data_buf
x_steps = 0;
}
- char *multi_str = NULL;
+ const char *multi_str = NULL;
if (x_steps < 0) {
str = cursor_left;
multi_str = parm_left_cursor;
@@ -594,7 +594,7 @@ static void s_write_char(screen_t *s, da
}
/// Send the specified string through tputs and append the output to the specified buffer.
-static void s_write_mbs(data_buffer_t *b, char *s) {
+static void s_write_mbs(data_buffer_t *b, const char *s) {
scoped_buffer_t scoped_buffer(b);
writembs(s);
}