)]}'
{
  "commit": "e0b3df3b4d77706abf5f077477b2ca227fc4e9d1",
  "tree": "21b0c20eb478a4fe2a4fc596a730fd285f778182",
  "parents": [
    "548d634f1b61571f118c3133ce0e8986714c8fd6"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Wed Oct 19 15:12:57 2022 +0100"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Mon Oct 24 17:19:04 2022 +0100"
  },
  "message": "sim/ppc: fix for operator precedence warning from clang\n\nIn the ppc simulator, clang was warning about some code like this:\n\n  busy_ptr-\u003enr_writebacks \u003d 1 + (PPC_ONE_BIT_SET_P(out_vmask)) ? 1 : 2;\n\nThe warning was:\n\n  operator \u0027?:\u0027 has lower precedence than \u0027+\u0027; \u0027+\u0027 will be evaluated first\n\nI suspect that this is not the original authors intention.\nPPC_ONE_BIT_SET_P is going to be 0 or 1, so if we evaluate the \u0027+\u0027\nfirst, the condition will always be non-zero, so true.  The whole\nexpression could then be simplified to just \u00271\u0027, which doesn\u0027t make\nmuch sense.\n\nI suspect the answer the author was expecting was either 2 or 3.  Why\nthey didn\u0027t just write:\n\n  busy_ptr-\u003enr_writebacks \u003d (PPC_ONE_BIT_SET_P(out_vmask)) ? 2 : 3;\n\nI have no clue, however, to keep the structure of the code unchanged,\nI\u0027ve updated things to:\n\n  busy_ptr-\u003enr_writebacks \u003d 1 + (PPC_ONE_BIT_SET_P (out_vmask) ? 1 : 2);\n\nwhich silences the warning from clang, and is, I am guessing, what the\noriginal author intended.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "63fe95a53d513a6054b334187c9b6a6858ac7895",
      "old_mode": 33188,
      "old_path": "sim/ppc/altivec.igen",
      "new_id": "f3ad32d8825a880d2e766788a6f56b0b7eabf8f7",
      "new_mode": 33188,
      "new_path": "sim/ppc/altivec.igen"
    }
  ]
}
