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`.
This commit is contained in:
Bernhard M. Wiedemann 2023-10-19 05:59:55 +02:00
parent c8c5f77595
commit 679e69be89
3 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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

View file

@ -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
}