Merge branch 'silence-tiocswinsz-conversion-warning'

This commit is contained in:
Daniel Eklöf 2020-10-31 11:17:00 +01:00
commit 0271e377c0
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 5 additions and 2 deletions

View file

@ -66,6 +66,9 @@
* XCursor shape in CSD corners when window is tiled. * XCursor shape in CSD corners when window is tiled.
* Error handling when processing keyboard input (maybe * Error handling when processing keyboard input (maybe
https://codeberg.org/dnkl/foot/issues/171). https://codeberg.org/dnkl/foot/issues/171).
* Compilation error _"overflow in conversion from long 'unsigned int'
to 'int' changes value... "_ seen on platforms where the `request`
argument in `ioctl(3)` is an `int` (for example: linux/ppc64).
### Security ### Security

View file

@ -2206,7 +2206,7 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
term->margins.left, term->margins.right, term->margins.top, term->margins.bottom); term->margins.left, term->margins.right, term->margins.top, term->margins.bottom);
/* Signal TIOCSWINSZ */ /* Signal TIOCSWINSZ */
if (term->ptmx >= 0 && ioctl(term->ptmx, TIOCSWINSZ, if (term->ptmx >= 0 && ioctl(term->ptmx, (unsigned int)TIOCSWINSZ,
&(struct winsize){ &(struct winsize){
.ws_row = term->rows, .ws_row = term->rows,
.ws_col = term->cols, .ws_col = term->cols,

View file

@ -928,7 +928,7 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
goto close_fds; goto close_fds;
} }
if (ioctl(ptmx, TIOCSWINSZ, if (ioctl(ptmx, (unsigned int)TIOCSWINSZ,
&(struct winsize){.ws_row = 24, .ws_col = 80}) < 0) &(struct winsize){.ws_row = 24, .ws_col = 80}) < 0)
{ {
LOG_ERRNO("failed to set initial TIOCSWINSZ"); LOG_ERRNO("failed to set initial TIOCSWINSZ");