From e994c6ca5471e8ac1efdbc3c2cddcd720164db5f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 2 Aug 2022 18:29:15 -0700 Subject: [PATCH] gvpr: represent binding count as a size_t Squashes 3 -Wsign-conversion warnings. --- lib/gvpr/gprstate.c | 3 ++- lib/gvpr/gprstate.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/gvpr/gprstate.c b/lib/gvpr/gprstate.c index 2bd42fa31..afe1e95b0 100644 --- a/lib/gvpr/gprstate.c +++ b/lib/gvpr/gprstate.c @@ -18,6 +18,7 @@ #include #include #include +#include static int name_used; @@ -95,7 +96,7 @@ findBinding (Gpr_t* state, char* fname) */ void addBindings (Gpr_t* state, gvprbinding* bindings) { - int n = 0; + size_t n = 0; gvprbinding* bp = bindings; gvprbinding* buf; gvprbinding* bufp; diff --git a/lib/gvpr/gprstate.h b/lib/gvpr/gprstate.h index a26d2d403..a5f5e07b2 100644 --- a/lib/gvpr/gprstate.h +++ b/lib/gvpr/gprstate.h @@ -18,6 +18,7 @@ extern "C" { #include "cgraph.h" #include #include +#include #include #include #include "gvpr.h" @@ -60,7 +61,7 @@ extern "C" { char **argv; int flags; gvprbinding* bindings; - int n_bindings; + size_t n_bindings; } Gpr_t; typedef struct { -- 2.40.0