From: Matthew Fernandez Date: Thu, 3 Nov 2022 02:20:41 +0000 (-0700) Subject: smyrna: use a more appropriate type for 'ComboValuesCount' X-Git-Tag: 7.0.1~5^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e02380d97d62b70d6bbe581eb554fbe941306c5;p=graphviz smyrna: use a more appropriate type for 'ComboValuesCount' Squashes two compiler warnings: gui/gui.c:94:96: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion] 94 | attr[attrcount].ComboValuesCount - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ gui/gui.c:95:78: warning: conversion to ‘size_t’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Wsign-conversion] 95 | attr[attrcount].ComboValuesCount, | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ --- diff --git a/cmd/smyrna/smyrnadefs.h b/cmd/smyrna/smyrnadefs.h index 2b0935d0f..9327f98dd 100644 --- a/cmd/smyrna/smyrnadefs.h +++ b/cmd/smyrna/smyrnadefs.h @@ -25,6 +25,7 @@ #include #include "hier.h" #include +#include #ifdef _WIN32 //this is needed on _WIN32 to get libglade see the callback #define _BB __declspec(dllexport) @@ -281,7 +282,7 @@ typedef struct char *Default; char Engine[GVK_FDP + 1]; char **ComboValues; - int ComboValuesCount; + size_t ComboValuesCount; GtkWidget *attrWidget; } attribute;