Skip to content

Commit

Permalink
Fix compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed Nov 10, 2023
1 parent 5f05b14 commit 83b90b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions line.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ static int store_char(LWCHAR ch, int a, constant char *rep, POSITION pos)
{
/* We haven't left-shifted enough yet. */
if (a == AT_ANSI)
xbuf_add_char(&shifted_ansi, ch); /* Save ANSI attributes */
xbuf_add_char(&shifted_ansi, (char) ch); /* Save ANSI attributes */
if (linebuf.end > linebuf.print)
{
/* Shift left enough to put last byte of this char at print-1. */
Expand Down Expand Up @@ -990,13 +990,13 @@ static int store_ansi(LWCHAR ch, constant char *rep, POSITION pos)
STORE_CHAR(ch, AT_ANSI, rep, pos);
if (line_ansi->hlink)
hlink_in_line = 1;
xbuf_add_char(&last_ansi, ch);
xbuf_add_char(&last_ansi, (char) ch);
break;
case ANSI_END:
STORE_CHAR(ch, AT_ANSI, rep, pos);
ansi_done(line_ansi);
line_ansi = NULL;
xbuf_add_char(&last_ansi, ch);
xbuf_add_char(&last_ansi, (char) ch);
xbuf_set(&last_ansis[curr_last_ansi], &last_ansi);
xbuf_reset(&last_ansi);
curr_last_ansi = (curr_last_ansi + 1) % NUM_LAST_ANSIS;
Expand Down
3 changes: 2 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ static void try_utf8_locale(int *pargc, constant char ***pargv)
{
char *locale_orig = strdup(setlocale(LC_ALL, 0));
wchar_t **wargv = 0, *wenv, *wp;
char **u8argv, *u8e;
constant char **u8argv;
char *u8e;
int i, n;

if (!setlocale(LC_ALL, ".UTF8"))
Expand Down

0 comments on commit 83b90b6

Please sign in to comment.