sim: cr16: fix build on gcc-12 (NULL comparison)
authorSergei Trofimovich <siarheit@google.com>
Sun, 14 Nov 2021 17:39:35 +0000 (17:39 +0000)
committerSergei Trofimovich <siarheit@google.com>
Tue, 16 Nov 2021 23:32:00 +0000 (23:32 +0000)
commite97436b1b789dcdb6ffb502263f4c86f8bc22996
treeb9f1a2bdf5eab33e6d1fb34298b5d5383dac1c08
parent7f74204ad972f6c0d0ff846af9f1f2f7e76fa5c5
sim: cr16: fix build on gcc-12 (NULL comparison)

On gcc-12 build fails as:

    sim/cr16/interp.c: In function 'lookup_hash':
    sim/cr16/interp.c:89:25: error:
      the comparison will always evaluate as 'true'
      for the address of 'mnimonic' will never be NULL [-Werror=address]
       89 |   if ((h->ops->mnimonic != NULL) &&
          |                         ^~

'mnimonic' is a sharr array within ops. It can never be NULL.

While at it renamed 'mnimonic' to 'mnemonic'.
sim/cr16/cr16_sim.h
sim/cr16/interp.c