gdb build broken in sim with -Wall -Werror

Tom de Vries
2021-05-17T07:02:55Z

Hi,

this morning I tried to rebuild gdb from trunk @ f4fdd84587e (with
--enable-werror and CFLAGS="-O0 -g -Wall", as usual) and ran into build
errors in sim.

Specifically:
...
$ grep error: build/MAKELOG \
| grep -v handle_error \
| sed "s/.*error: //" \
| sort \
| uniq -c
6 comparison between 'attach_type {aka enum _attach_type}' and
'enum <anonymous>' [-Werror=enum-compare]
54 'cpu_create' defined but not used [-Werror=unused-function]
42 'cpu_data_map' defined but not used [-Werror=unused-function]
54 'cpu_instruction_map' defined but not used [-Werror=unused-function]
54 'cpu_interrupts' defined but not used [-Werror=unused-function]
42 'cpu_model' defined but not used [-Werror=unused-function]
51 'cpu_monitor' defined but not used [-Werror=unused-function]
54 'cpu_os_emulation' defined but not used [-Werror=unused-function]
27 'cpu_registers' defined but not used [-Werror=unused-function]
51 'cpu_reservation' defined but not used [-Werror=unused-function]
45 'cpu_system' defined but not used [-Werror=unused-function]
3 'device_event_queue_deschedule' declared 'static' but never
defined [-Werror=unused-function]
3 'device_event_queue_time' declared 'static' but never defined
[-Werror=unused-function]
3 'event_queue_create' defined but not used [-Werror=unused-function]
3 'mon_cpu' defined but not used [-Werror=unused-function]
3 'mon_create' defined but not used [-Werror=unused-function]
3 null argument where non-null required (argument 1) [-Werror=nonnull]
15 pointer targets in passing argument 4 of
'device_find_integer_array_property' differ in signedness
[-Werror=pointer-sign]
...

Thanks,
- Tom