From 3e4f5c0ed9cee8d1bd40de8d0bded36f20b9356a Mon Sep 17 00:00:00 2001 From: waltje Date: Tue, 16 Oct 2018 20:05:13 -0400 Subject: [PATCH] Fix up some warnings and silly errors. --- src/devices/cdrom/cdrom.h | 4 ++++ src/devices/cdrom/cdrom_image.cpp | 4 ++-- src/devices/cdrom/cdrom_image.h | 3 +-- src/devices/scsi/scsi_cdrom.c | 4 ++-- src/devices/scsi/scsi_disk.c | 4 ++-- src/devices/scsi/scsi_x54x.c | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/devices/cdrom/cdrom.h b/src/devices/cdrom/cdrom.h index 5668822..487c99c 100644 --- a/src/devices/cdrom/cdrom.h +++ b/src/devices/cdrom/cdrom.h @@ -67,6 +67,10 @@ enum { #define CDROM_BUS_MAX (CDROM_BUS_USB) /* USB exclusive */ +/* To shut up the GCC compilers. */ +struct cdrom; + + /* Define the various CD-ROM drive operations (ops). */ typedef struct { int (*ready)(struct cdrom *dev); diff --git a/src/devices/cdrom/cdrom_image.cpp b/src/devices/cdrom/cdrom_image.cpp index cbd0b5c..63ac0e1 100644 --- a/src/devices/cdrom/cdrom_image.cpp +++ b/src/devices/cdrom/cdrom_image.cpp @@ -8,7 +8,7 @@ * * CD-ROM image support. * - * Version: @(#)cdrom_image.cpp 1.0.11 2018/10/15 + * Version: @(#)cdrom_image.cpp 1.0.12 2018/10/16 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -60,7 +60,7 @@ int cdrom_image_do_log = ENABLE_CDROM_IMAGE_LOG; void -cdrom_image_log(int level, const char *fmt, ...) +cdrom_image_log(UNUSED(int level), UNUSED(const char *fmt), ...) { #ifdef ENABLE_CDROM_IMAGE_LOG va_list ap; diff --git a/src/devices/cdrom/cdrom_image.h b/src/devices/cdrom/cdrom_image.h index 684eaaa..d95e7a5 100644 --- a/src/devices/cdrom/cdrom_image.h +++ b/src/devices/cdrom/cdrom_image.h @@ -8,7 +8,7 @@ * * Definitions for the CD-ROM image file handlers. * - * Version: @(#)cdrom_image.h 1.0.6 2018/10/14 + * Version: @(#)cdrom_image.h 1.0.7 2018/10/16 * * Authors: Miran Grca, * RichardG, @@ -43,7 +43,6 @@ extern "C" { #endif extern int cdrom_image_do_log; -extern const cdrom_ops_t cdrom_image_ops; extern void cdrom_image_log(int level, const char *fmt, ...); diff --git a/src/devices/scsi/scsi_cdrom.c b/src/devices/scsi/scsi_cdrom.c index aee1571..317f6a7 100644 --- a/src/devices/scsi/scsi_cdrom.c +++ b/src/devices/scsi/scsi_cdrom.c @@ -8,7 +8,7 @@ * * Emulation of SCSI (and ATAPI) CD-ROM drives. * - * Version: @(#)scsi_cdrom.c 1.0.1 2018/10/15 + * Version: @(#)scsi_cdrom.c 1.0.2 2018/10/16 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -354,7 +354,7 @@ int scsi_cdrom_do_log = ENABLE_SCSI_CDROM_LOG; #endif -static void +void scsi_cdrom_log(int level, const char *fmt, ...) { #ifdef ENABLE_SCSI_CDROM_LOG diff --git a/src/devices/scsi/scsi_disk.c b/src/devices/scsi/scsi_disk.c index a817a6e..efba64b 100644 --- a/src/devices/scsi/scsi_disk.c +++ b/src/devices/scsi/scsi_disk.c @@ -8,7 +8,7 @@ * * Emulation of SCSI fixed disks. * - * Version: @(#)scsi_disk.c 1.0.14 2018/10/15 + * Version: @(#)scsi_disk.c 1.0.15 2018/10/16 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -171,7 +171,7 @@ int scsi_disk_do_log = ENABLE_SCSI_DISK_LOG; #endif -static void +void scsi_disk_log(int level, const char *fmt, ...) { #ifdef ENABLE_SCSI_DISK_LOG diff --git a/src/devices/scsi/scsi_x54x.c b/src/devices/scsi/scsi_x54x.c index cf12be6..1c06854 100644 --- a/src/devices/scsi/scsi_x54x.c +++ b/src/devices/scsi/scsi_x54x.c @@ -537,7 +537,7 @@ x54x_bios_command(x54x_t *x54x, uint8_t max_id, BIOSCMD *cmd, int8_t islba) case 0x11: /* Recalibrate */ target_check(cmd->id, cmd->lun); - cdb[0] = cdb[0] = bios_cmd_to_scsi[cmd->command]; + cdb[0] = bios_cmd_to_scsi[cmd->command]; cdb[1] = (cmd->lun & 7) << 5; ret = x54x_bios_scsi_command(dev, cdb, NULL, sector_len, dma_address);