grDStyle.c: GrLoadStyles() scount, The left operand of '<' is a garbage value

The use of 'scount' in this function looks complex, it seems to be reset to
zero sometimes and incremented at others.  Analysis shows there is a possible
path where is maybe used uninitialized.

Setting to zero seems like a good choice.

SonarCloud
grDStyle.c:514 The left operand of '<' is a garbage value
https://sonarcloud.io/project/issues?open=AZJB16zUNGfDNup0RiqE&id=dlmiles_magic
This commit is contained in:
Darryl L. Miles 2024-10-04 20:18:46 +01:00 committed by Tim Edwards
parent bbe447423b
commit 60f308826d
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ char *libPath;
{
FILE *inp;
int res = 0;
int i, scount, processed = DISP_VERSION;
int i, scount = 0, processed = DISP_VERSION;
char fullName[256];
dstylelink *sstyle;
int MaxTechStyles = 0, MaxTileStyles = 0;