From: nicm Date: Fri, 30 Jun 2023 21:55:08 +0000 (+0000) Subject: Change a few types to fix warnings, from Thomas Klausner. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6af87e9a3a0d032d058c8784bbc60542d9de0ec3;p=openbsd Change a few types to fix warnings, from Thomas Klausner. --- diff --git a/usr.bin/tmux/arguments.c b/usr.bin/tmux/arguments.c index 3c173309fab..b62d1f71e50 100644 --- a/usr.bin/tmux/arguments.c +++ b/usr.bin/tmux/arguments.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arguments.c,v 1.59 2023/03/15 08:15:39 nicm Exp $ */ +/* $OpenBSD: arguments.c,v 1.60 2023/06/30 21:55:08 nicm Exp $ */ /* * Copyright (c) 2010 Nicholas Marriott @@ -189,7 +189,7 @@ out: /* Parse flags argument. */ static int args_parse_flags(const struct args_parse *parse, struct args_value *values, - u_int count, char **cause, struct args *args, int *i) + u_int count, char **cause, struct args *args, u_int *i) { struct args_value *value; u_char flag; diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c index 09816b5a6af..17c9e7528a8 100644 --- a/usr.bin/tmux/grid.c +++ b/usr.bin/tmux/grid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grid.c,v 1.128 2023/05/08 10:03:39 tb Exp $ */ +/* $OpenBSD: grid.c,v 1.129 2023/06/30 21:55:08 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -1044,7 +1044,8 @@ grid_string_cells(struct grid *gd, u_int px, u_int py, u_int nx, const char *data; char *buf, code[8192]; size_t len, off, size, codelen; - u_int xx, has_link = 0, end; + u_int xx, end; + int has_link = 0; const struct grid_line *gl; if (lastgc != NULL && *lastgc == NULL) { diff --git a/usr.bin/tmux/regsub.c b/usr.bin/tmux/regsub.c index 12a497b1392..87d7d0aacee 100644 --- a/usr.bin/tmux/regsub.c +++ b/usr.bin/tmux/regsub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: regsub.c,v 1.5 2020/04/09 14:23:34 nicm Exp $ */ +/* $OpenBSD: regsub.c,v 1.6 2023/06/30 21:55:09 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott @@ -24,7 +24,7 @@ #include "tmux.h" static void -regsub_copy(char **buf, size_t *len, const char *text, size_t start, size_t end) +regsub_copy(char **buf, ssize_t *len, const char *text, size_t start, size_t end) { size_t add = end - start; @@ -34,7 +34,7 @@ regsub_copy(char **buf, size_t *len, const char *text, size_t start, size_t end) } static void -regsub_expand(char **buf, size_t *len, const char *with, const char *text, +regsub_expand(char **buf, ssize_t *len, const char *with, const char *text, regmatch_t *m, u_int n) { const char *cp; diff --git a/usr.bin/tmux/utf8.c b/usr.bin/tmux/utf8.c index f6b637495a2..7c142c5593e 100644 --- a/usr.bin/tmux/utf8.c +++ b/usr.bin/tmux/utf8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utf8.c,v 1.60 2023/01/08 22:15:30 nicm Exp $ */ +/* $OpenBSD: utf8.c,v 1.61 2023/06/30 21:55:09 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -95,7 +95,7 @@ utf8_item_by_index(u_int index) /* Add a UTF-8 item. */ static int -utf8_put_item(const char *data, size_t size, u_int *index) +utf8_put_item(const u_char *data, size_t size, u_int *index) { struct utf8_item *ui; diff --git a/usr.bin/tmux/window-tree.c b/usr.bin/tmux/window-tree.c index bb3658cba20..6af8326429f 100644 --- a/usr.bin/tmux/window-tree.c +++ b/usr.bin/tmux/window-tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-tree.c,v 1.62 2022/07/04 08:39:45 nicm Exp $ */ +/* $OpenBSD: window-tree.c,v 1.63 2023/06/30 21:55:09 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott @@ -671,9 +671,9 @@ window_tree_draw_window(struct window_tree_modedata *data, struct session *s, struct window_pane *wp; u_int cx = ctx->s->cx, cy = ctx->s->cy; u_int loop, total, visible, each, width, offset; - u_int current, start, end, remaining, i; + u_int current, start, end, remaining, i, pane_idx; struct grid_cell gc; - int colour, active_colour, left, right, pane_idx; + int colour, active_colour, left, right; char *label; total = window_count_panes(w);