From b91b2434e1839e8adc906cfd0811d14142ddf06a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20DAVID?= Date: Wed, 18 Jan 2017 11:20:28 +0100 Subject: [PATCH] Coverity: fix C uninitialized variables Change-Id: I48a564738be1b4c131be84b188f29d33fdf3ed17 --- scilab/modules/graphics/src/c/Gray.c | 2 +- scilab/modules/graphics/src/c/Plo2dn.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scilab/modules/graphics/src/c/Gray.c b/scilab/modules/graphics/src/c/Gray.c index 72f8908..935edbc 100644 --- a/scilab/modules/graphics/src/c/Gray.c +++ b/scilab/modules/graphics/src/c/Gray.c @@ -60,7 +60,7 @@ int C2F(xgray)(double *x, double *y, double *z, int *n1, int *n2, char *strflag, int clipState = 0; int autoScale = 0; int firstPlot = 0; - int logFlags[3]; + int logFlags[3] = {0}; char dataflag = 0; int autoSubticks = 0; diff --git a/scilab/modules/graphics/src/c/Plo2dn.c b/scilab/modules/graphics/src/c/Plo2dn.c index 64b562c..aa221df 100644 --- a/scilab/modules/graphics/src/c/Plo2dn.c +++ b/scilab/modules/graphics/src/c/Plo2dn.c @@ -110,7 +110,7 @@ int plot2dn(int ptype, char *logflags, double *x, double *y, int *n1, int *n2, i int *pObj = NULL; int cmpt = 0; int with_leg = 0; - double drect[6]; + double drect[6] = {0}; char dataflag = 0; BOOL bounds_changed = FALSE; @@ -628,7 +628,7 @@ BOOL update_specification_bounds(int iSubwinUID, double rect[6], int flag) if (flag != 3) { getGraphicObjectProperty(iSubwinUID, __GO_DATA_BOUNDS__, jni_double_vector, (void **)&dataBounds); - + if (dataBounds) { rect[4] = dataBounds[4]; -- 1.7.9.5