From e8ebfc3b1df532ffde2874bc43c6801de67f9dd3 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 6 Sep 2022 21:08:34 -0700 Subject: [PATCH] smyrna: use a 'size_t' for 'ViewInfo.mouse_action_count' Squashes two -Wsign-conversion warnings. --- cmd/smyrna/hotkeymap.c | 3 +-- cmd/smyrna/smyrnadefs.h | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/smyrna/hotkeymap.c b/cmd/smyrna/hotkeymap.c index 09e048815..3952c48e6 100644 --- a/cmd/smyrna/hotkeymap.c +++ b/cmd/smyrna/hotkeymap.c @@ -164,7 +164,6 @@ void load_mouse_actions(ViewInfo * v) int get_mode(ViewInfo * v) { - int ind = 0; glMouseButtonType curMouseType = v->mouse.t; int curDragging = ((v->mouse.dragX != 0) || (v->mouse.dragY != 0)); smyrna_view_mode view_mode; @@ -175,7 +174,7 @@ int get_mode(ViewInfo * v) view_mode = smyrna_fisheye; - for (; ind < v->mouse_action_count; ind++) { + for (size_t ind = 0; ind < v->mouse_action_count; ind++) { if ((v->mouse_actions[ind].hotkey == v->keymap.keyVal) && (v->mouse_actions[ind].type == curMouseType) diff --git a/cmd/smyrna/smyrnadefs.h b/cmd/smyrna/smyrnadefs.h index 9f2c1d7e3..02181381f 100644 --- a/cmd/smyrna/smyrnadefs.h +++ b/cmd/smyrna/smyrnadefs.h @@ -16,6 +16,7 @@ #endif #endif +#include #include #include #include @@ -436,7 +437,7 @@ typedef struct ArcBall_t *arcball; keymap_t keymap; mouse_action_t* mouse_actions; /*customizable moouse interraction list*/ - int mouse_action_count; + size_t mouse_action_count; refresh_filter refresh; int edgerendertype; float nodeScale; -- 2.40.0