On Fri, Oct 26, 2018 at 05:27:05PM -0500, John D. Baker wrote: > --- wdc.o --- > /x/current/src/sys/dev/ic/wdc.c:138:1: error: missing initializer for field > 'ata_recovery' of 'const struct ata_bustype' > [-Werror=missing-field-initializers] > }; > ^ > In file included from /x/current/src/sys/dev/ic/wdc.c:90:0: > /x/current/src/sys/dev/ata/atavar.h:376:9: note: 'ata_recovery' declared here > void (*ata_recovery)(struct ata_channel *, int, uint32_t); > ^~~~~~~~~~~~
I assume the fix is this, to set it to NULL like it would be in the NWD > 0 case. I've converted it to a C99 initializer while there. Index: dev/ic/wdc.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/wdc.c,v retrieving revision 1.289 diff -u -r1.289 wdc.c --- dev/ic/wdc.c 22 Oct 2018 20:13:47 -0000 1.289 +++ dev/ic/wdc.c 26 Oct 2018 22:38:35 -0000 @@ -126,15 +126,16 @@ #else /* A fake one, the autoconfig will print "wd at foo ... not configured */ const struct ata_bustype wdc_ata_bustype = { - SCSIPI_BUSTYPE_ATA, - NULL, /* wdc_ata_bio */ - NULL, /* wdc_reset_drive */ - wdc_reset_channel, - wdc_exec_command, - NULL, /* ata_get_params */ - NULL, /* wdc_ata_addref */ - NULL, /* wdc_ata_delref */ - NULL /* ata_kill_pending */ + .bus_type = SCSIPI_BUSTYPE_ATA, + .ata_bio = NULL, + .wdc_reset_drive = NULL, + .ata_reset_channel = wdc_reset_channel, + .ata_exec_command = wdc_exec_command, + .ata_get_params = NULL, + .ata_addref = NULL, + .ata_delref = NULL, + .ata_killpending = NULL, + .ata_recovery = NULL, }; #endif