Change a few types to fix warnings, from Thomas Klausner.

This commit is contained in:
nicm 2023-06-30 21:55:08 +00:00
parent 4e57894e85
commit a2a02fd7d7
5 changed files with 8 additions and 7 deletions

View File

@ -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;

3
grid.c
View File

@ -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) {

View File

@ -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;

2
utf8.c
View File

@ -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;

View File

@ -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);