diff --git a/regress/regress.c b/regress/regress.c index 93972071..5f63e6aa 100644 --- a/regress/regress.c +++ b/regress/regress.c @@ -55,7 +55,7 @@ void tenth_last_column(void) tcgetwincurpos(1, &wcp); if ( wcp.wcp_col - ws.ws_col < 10 ) printf("\n"); - printf("\e[%zuG", ws.ws_col - 10); + printf("\e[%zuG", (size_t) (ws.ws_col - 10)); fflush(stdout); } diff --git a/sh/sh.c b/sh/sh.c index 3ff1cc62..07e4f408 100644 --- a/sh/sh.c +++ b/sh/sh.c @@ -95,9 +95,9 @@ void update_env(void) struct winsize ws; if ( tcgetwinsize(0, &ws) == 0 ) { - snprintf(str, sizeof(str), "%zu", ws.ws_col); + snprintf(str, sizeof(str), "%zu", (size_t) ws.ws_col); setenv("COLUMNS", str, 1); - snprintf(str, sizeof(str), "%zu", ws.ws_row); + snprintf(str, sizeof(str), "%zu", (size_t) ws.ws_row); setenv("LINES", str, 1); } }