)]}'
{
  "commit": "cb9d1609da6e623158ba5a8cb4a2712bcea4f57f",
  "tree": "3dca6e374b50714643a347533a3074cd4a1d1653",
  "parents": [
    "2b06e59de0675c2cb526af2de6803dae29703d15"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Wed Oct 12 11:07:24 2022 +0100"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Wed Oct 19 14:32:21 2022 +0100"
  },
  "message": "sim/cgen: mask uninitialized variable warning in cgen-run.c\n\nI see an uninitialized variable warning (with gcc 9.3.1) from\ncgen-run.c, like this:\n\n  /tmp/build/sim/../../src/sim/cris/../common/cgen-run.c: In function ‘sim_resume’:\n  /tmp/build/sim/../../src/sim/cris/../common/cgen-run.c:259:5: warning: ‘engine_fns$’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n    259 |    (* engine_fns[next_cpu_nr]) (cpu);\n        |    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  /tmp/build/sim/../../src/sim/cris/../common/cgen-run.c:232:14: note: ‘engine_fns$’ was declared here\n    232 |   ENGINE_FN *engine_fns[MAX_NR_PROCESSORS];\n        |              ^~~~~~~~~~\n\nThis is a false positive - we over allocate engine_fn, and then only\ninitialize the nr_cpus entries which we will later go on to use.\n\nHowever, we can easily silence this warning by initializing the unused\nentries in engine_fns to NULL, this might also help if anyone ever\nlooks at engine_fns in a debugger, it should now be obvious which\nentries are in use, and which are not.\n\nWith this change the warning is gone.\n\nThere should be no change in behaviour with this commit.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9a13b0ca41659b49289f2c3d0c49d51fc1837ddc",
      "old_mode": 33188,
      "old_path": "sim/common/cgen-run.c",
      "new_id": "a9a493c01b9fe7f5348f6e95884b281c752d80c8",
      "new_mode": 33188,
      "new_path": "sim/common/cgen-run.c"
    }
  ]
}
