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:
parent
c17371b42a
commit
afee50e89e
1 changed files with 1 additions and 1 deletions
2
qjs.c
2
qjs.c
|
@ -489,7 +489,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
if (empty_run && dump_memory) {
|
if (empty_run && dump_memory) {
|
||||||
clock_t t[5];
|
clock_t t[5];
|
||||||
double best[5];
|
double best[5] = {0};
|
||||||
int i, j;
|
int i, j;
|
||||||
for (i = 0; i < 100; i++) {
|
for (i = 0; i < 100; i++) {
|
||||||
t[0] = clock();
|
t[0] = clock();
|
||||||
|
|
Loading…
Reference in a new issue