From 35e35e571b0f197364bbd177aee9079bef2a9ea7 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 29 Oct 2022 22:06:19 +0300 Subject: [PATCH 30/30] sdl2: Make some popup_diplomatic_objects() vars unsigned There can't be negative count, nor size (width or height) Helps compilers' (and other tools) heuristics See osdn #45985 Signed-off-by: Marko Lindqvist --- client/gui-sdl2/diplodlg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/gui-sdl2/diplodlg.c b/client/gui-sdl2/diplodlg.c index 94a87a7aac..855359b374 100644 --- a/client/gui-sdl2/diplodlg.c +++ b/client/gui-sdl2/diplodlg.c @@ -465,11 +465,13 @@ static struct ADVANCED_DLG *popup_diplomatic_objects(struct player *pPlayer0, { struct ADVANCED_DLG *pDlg = fc_calloc(1, sizeof(struct ADVANCED_DLG)); struct CONTAINER *pCont = fc_calloc(1, sizeof(struct CONTAINER)); - int width, height, count = 0, scroll_w = 0; + unsigned width, height; + unsigned count = 0; + unsigned scroll_w = 0; char cBuf[128]; struct widget *pBuf = NULL, *pWindow; utf8_str *pstr; - int window_x = 0, window_y = 0; + unsigned window_x = 0, window_y = 0; SDL_Rect area; enum diplstate_type type = player_diplstate_get(pPlayer0, pPlayer1)->type; -- 2.35.1