[gdb/build] Fix -Werror=bool-compare warning in update_static_array_size
authorTom de Vries <tdevries@suse.de>
Wed, 18 Nov 2020 18:59:45 +0000 (19:59 +0100)
committerTom de Vries <tdevries@suse.de>
Wed, 18 Nov 2020 18:59:45 +0000 (19:59 +0100)
commit5d8254e18560653d6d4d4d62be2a35ef68de4376
tree6e83ddb67d68bc20f8ff65551f689c546e8dad2e
parente4d9e5422fa233e9e32ce89e07a5a6ca89e85090
[gdb/build] Fix -Werror=bool-compare warning in update_static_array_size

With current trunk I run into:
...
src/gdb/gdbtypes.c: In function 'bool update_static_array_size(type*)':
src/gdb/gdbtypes.c:1250:64: error: comparison of constant '0' with boolean \
  expression is always true [-Werror=bool-compare]
    && get_array_bounds (element_type, &low_bound, &high_bound) >= 0
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
...

Fix this by dropping the compare.

gdb/ChangeLog:

2020-11-18  Tom de Vries  <tdevries@suse.de>

* gdbtypes.c (update_static_array_size): Fix -Werror=bool-compare
warning.
gdb/ChangeLog
gdb/gdbtypes.c