Fix compilation warning

~~~
/home/runner/work/quickjs/quickjs/qjs.c:506:28: error: ‘best[3]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  506 |                 if (i == 0 || best[j] > ms)
      |                     ~~~~~~~^~~~~~~~~~~~~~~
/home/runner/work/quickjs/quickjs/qjs.c:506:28: error: ‘best[2]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
/home/runner/work/quickjs/quickjs/qjs.c:506:28: error: ‘best[1]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
~~~
This commit is contained in:
Saúl Ibarra Corretgé 2023-11-11 15:37:23 +01:00
parent c17371b42a
commit afee50e89e

2
qjs.c
View file

@ -489,7 +489,7 @@ int main(int argc, char **argv)
if (empty_run && dump_memory) {
clock_t t[5];
double best[5];
double best[5] = {0};
int i, j;
for (i = 0; i < 100; i++) {
t[0] = clock();