]> sigrok.org Git - libsigrok.git/commit
hameg-hmo: Fix two compiler warnings (-Warray-bounds).
authorUwe Hermann <redacted>
Tue, 30 Jul 2019 18:17:32 +0000 (20:17 +0200)
committerUwe Hermann <redacted>
Tue, 30 Jul 2019 21:53:42 +0000 (23:53 +0200)
commitc38d69adf4f0038871a65eac44bb9ffd84a9786f
treee3bd980251e37793ec24f300acff8e59f3c549dd
parent97a000748a1a4ca7370121af0c84d0e2281d527a
hameg-hmo: Fix two compiler warnings (-Warray-bounds).

  src/hardware/hameg-hmo/protocol.c: In function ‘hmo_scope_state_get’:
  src/hardware/hameg-hmo/protocol.c:1035:31: warning: array subscript 0 is above array bounds of ‘char *[0]’ [-Warray-bounds]
     g_free(logic_threshold_short[i]);
            ~~~~~~~~~~~~~~~~~~~~~^~~
  src/hardware/hameg-hmo/protocol.c:1035:31: warning: array subscript 0 is above array bounds of ‘char *[0]’ [-Warray-bounds]
  src/hardware/hameg-hmo/protocol.c:974:24: warning: array subscript 0 is above array bounds of ‘char *[0]’ [-Warray-bounds]
     logic_threshold_short[i] = g_strdup((*config->logic_threshold)[i]);
     ~~~~~~~~~~~~~~~~~~~~~^~~
  src/hardware/hameg-hmo/protocol.c:974:24: warning: array subscript 0 is above array bounds of ‘char *[0]’ [-Warray-bounds]
src/hardware/hameg-hmo/protocol.c