aboutsummaryrefslogtreecommitdiff
path: root/tests/Utils.h
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-10-16 17:41:33 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-10-17 15:36:33 +0000
commitfae513c5585b9ba09c3aa8bfd4f7119208b7b5f9 (patch)
tree4c87da93a765e880d22a53904543e2e91660f7a5 /tests/Utils.h
parentebaddb600795911dc4e4c446d4f612caa009aaa1 (diff)
downloadComputeLibrary-fae513c5585b9ba09c3aa8bfd4f7119208b7b5f9.tar.gz
COMPMID-2486: Remove/add disabled compiler warnings
Removed the following flags: -Wno-vla -Wno-strict-overflow Added: -Wformat-security Change-Id: I49eb3d724e14db796e543164295674617c37cb65 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/2109 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'tests/Utils.h')
-rw-r--r--tests/Utils.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/Utils.h b/tests/Utils.h
index 3bb6060951..0c4aeb61f5 100644
--- a/tests/Utils.h
+++ b/tests/Utils.h
@@ -633,8 +633,8 @@ inline void init_separable_conv(int16_t *conv, unsigned int width, unsigned int
// Set it between -128 and 127 to ensure the matrix does not overflow
std::uniform_int_distribution<int16_t> distribution_int16(-128, 127);
- int16_t conv_row[width];
- int16_t conv_col[height];
+ int16_t *conv_row = new int16_t[width];
+ int16_t *conv_col = new int16_t[height];
conv_row[0] = conv_col[0] = 1;
for(unsigned int i = 1; i < width; ++i)
@@ -655,6 +655,9 @@ inline void init_separable_conv(int16_t *conv, unsigned int width, unsigned int
conv[i * width + j] = conv_col[i] * conv_row[j];
}
}
+
+ delete[] conv_row;
+ delete[] conv_col;
}
/** Create a vector with a uniform distribution of floating point values across the specified range.