misc: Check the return codes for a couple of writes

Shuts up some compile warnings.
This commit is contained in:
Solomon Peachy 2019-07-15 23:35:54 -04:00
parent ab4f2880d7
commit 6b76ab3542
4 changed files with 7 additions and 7 deletions

View File

@ -477,7 +477,7 @@ static int kodak6800_get_tonecurve(struct kodak6800_ctx *ctx, char *fname)
for (i = 0 ; i < 768; i++) {
/* Byteswap appropriately */
data[i] = cpu_to_be16(le16_to_cpu(data[i]));
write(tc_fd, &data[i], sizeof(uint16_t));
ret = write(tc_fd, &data[i], sizeof(uint16_t));
}
close(tc_fd);
}
@ -1092,7 +1092,7 @@ static const char *kodak6800_prefixes[] = {
/* Exported */
struct dyesub_backend kodak6800_backend = {
.name = "Kodak 6800/6850",
.version = "0.72" " (lib " LIBSINFONIA_VER ")",
.version = "0.73" " (lib " LIBSINFONIA_VER ")",
.uri_prefixes = kodak6800_prefixes,
.cmdline_usage = kodak6800_cmdline,
.cmdline_arg = kodak6800_cmdline_arg,

View File

@ -738,7 +738,7 @@ static int shinkos6145_dump_corrdata(struct shinkos6145_ctx *ctx, char *fname)
return fd;
}
write(fd, ctx->corrdata, sizeof(struct shinkos6145_correctionparam));
ret = write(fd, ctx->corrdata, sizeof(struct shinkos6145_correctionparam));
close(fd);
}
@ -768,7 +768,7 @@ static int shinkos6145_dump_eeprom(struct shinkos6145_ctx *ctx, char *fname)
return fd;
}
write(fd, ctx->eeprom, ctx->eepromlen);
ret = write(fd, ctx->eeprom, ctx->eepromlen);
close(fd);
}
@ -1574,7 +1574,7 @@ static const char *shinkos6145_prefixes[] = {
struct dyesub_backend shinkos6145_backend = {
.name = "Shinko/Sinfonia CHC-S6145/CS2/S2245/S3",
.version = "0.37" " (lib " LIBSINFONIA_VER ")",
.version = "0.38" " (lib " LIBSINFONIA_VER ")",
.uri_prefixes = shinkos6145_prefixes,
.cmdline_usage = shinkos6145_cmdline,
.cmdline_arg = shinkos6145_cmdline_arg,

View File

@ -612,7 +612,7 @@ int sinfonia_gettonecurve(struct sinfonia_usbdev *usbh, int type, char *fname)
/* Byteswap appropriately */
curves[i] = cpu_to_be16(le16_to_cpu(curves[i]));
}
write(tc_fd, curves, TONE_CURVE_SIZE * sizeof(uint16_t));
ret = write(tc_fd, curves, TONE_CURVE_SIZE * sizeof(uint16_t));
close(tc_fd);
}

View File

@ -27,7 +27,7 @@
*
*/
#define LIBSINFONIA_VER "0.05"
#define LIBSINFONIA_VER "0.06"
#define SINFONIA_HDR1_LEN 0x10
#define SINFONIA_HDR2_LEN 0x64