aboutsummaryrefslogtreecommitdiffstats
path: root/tests/encperf.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-11-07 21:36:05 +0100
committerPierre Ossman <ossman@cendio.se>2018-11-07 21:36:05 +0100
commitbeb59a43207f3ac411f1812e8a0dad01d9d1ef7a (patch)
treeb7a538c1d32072df900cdbe695ddbc869fb184c6 /tests/encperf.cxx
parent6e7f16907db1a0edcca86bcc67dc26003a8dd413 (diff)
downloadtigervnc-beb59a43207f3ac411f1812e8a0dad01d9d1ef7a.tar.gz
tigervnc-beb59a43207f3ac411f1812e8a0dad01d9d1ef7a.zip
Remove variable length arrays
These are not allowed in C++, and have been made optional in C11. So let's just get rid of them and any issues they may cause.
Diffstat (limited to 'tests/encperf.cxx')
-rw-r--r--tests/encperf.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/encperf.cxx b/tests/encperf.cxx
index 4e7038fd..733d55b6 100644
--- a/tests/encperf.cxx
+++ b/tests/encperf.cxx
@@ -423,8 +423,9 @@ int main(int argc, char **argv)
}
int runCount = count;
- struct stats runs[runCount];
- double values[runCount], dev[runCount];
+ struct stats *runs = new struct stats[runCount];
+ double *values = new double[runCount];
+ double *dev = new double[runCount];
double median, meddev;
if (fn == NULL) {