From 679e69be89dc7e0d177c5beabbbb00b9cff447ae Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Thu, 19 Oct 2023 05:59:55 +0200 Subject: [PATCH] Ensure functions return a value otherwise, gcc errored out because non-void functions are supposed to return a value. Alternatively, we could change the declaration to `void`. --- scsiapi/scsiapi_linux.c | 1 + scsiapi/scsiapi_macos.c | 2 +- scsiapi/scsiapi_windows.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scsiapi/scsiapi_linux.c b/scsiapi/scsiapi_linux.c index 052ef7b7..26c31588 100644 --- a/scsiapi/scsiapi_linux.c +++ b/scsiapi/scsiapi_linux.c @@ -218,6 +218,7 @@ int scsi_write(struct scsi_device * dev, const unsigned char * data, size_t data | Send pass through command | \*-----------------------------------------------------*/ ioctl(dev->fd, SG_IO, &header); + return 0; } #ifdef __cplusplus diff --git a/scsiapi/scsiapi_macos.c b/scsiapi/scsiapi_macos.c index 6d9cb3d3..d85aadb6 100644 --- a/scsiapi/scsiapi_macos.c +++ b/scsiapi/scsiapi_macos.c @@ -60,7 +60,7 @@ struct scsi_device * scsi_open_path(const char *path) int scsi_write(struct scsi_device * dev, const unsigned char * data, size_t data_length, const unsigned char * cdb, size_t cdb_length, unsigned char * sense, size_t sense_length) { - + return 0; } #ifdef __cplusplus diff --git a/scsiapi/scsiapi_windows.c b/scsiapi/scsiapi_windows.c index e9619110..638fe1d3 100644 --- a/scsiapi/scsiapi_windows.c +++ b/scsiapi/scsiapi_windows.c @@ -235,6 +235,7 @@ int scsi_write(struct scsi_device * dev, const unsigned char * data, size_t data | Free the buffer | \*-----------------------------------------------------*/ free(buffer); + return 0; } #ifdef __cplusplus }