hplip/SOURCES/hplip-fix-Wreturn-type-warn...

112 lines
3.8 KiB
Diff

--- hplip-3.20.3/prnt/hpps/hppsfilter.c.orig 2020-03-25 01:09:51.585129957 +0000
+++ hplip-3.20.3/prnt/hpps/hppsfilter.c 2020-03-25 01:10:15.610058293 +0000
@@ -104,7 +104,7 @@ static void open_tempbookletfile(char *m
if(ptempbooklet_file == NULL)
{
fprintf(stderr, "ERROR: Unable to open temp file %s\n", temp_filename);
- return 1;
+ return;
}
chmod(temp_filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
--- hplip-3.20.3/scan/sane/hpaio.c.orig 2020-03-25 01:24:15.558732638 +0000
+++ hplip-3.20.3/scan/sane/hpaio.c 2020-03-25 02:48:36.097054366 +0000
@@ -406,20 +406,34 @@ extern SANE_Status sane_hpaio_open(SANE_
extern void sane_hpaio_close(SANE_Handle handle)
{
- if (strcmp(*((char **)handle), "MARVELL") == 0)
- return marvell_close(handle);
- if (strcmp(*((char **)handle), "SOAP") == 0)
- return soap_close(handle);
- if (strcmp(*((char **)handle), "SOAPHT") == 0)
- return soapht_close(handle);
- if (strcmp(*((char **)handle), "LEDM") == 0)
- return ledm_close(handle);
- if (strcmp(*((char **)handle), "SCL-PML") == 0)
- return sclpml_close(handle);
- if (strcmp(*((char **)handle), "ESCL") == 0)
- return escl_close(handle);
- if (strcmp(*((char **)handle), "ORBLITE") == 0)
- return orblite_close(handle);
+ if (strcmp(*((char **)handle), "MARVELL") == 0) {
+ marvell_close(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "SOAP") == 0) {
+ soap_close(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "SOAPHT") == 0) {
+ soapht_close(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "LEDM") == 0) {
+ ledm_close(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "SCL-PML") == 0) {
+ sclpml_close(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "ESCL") == 0) {
+ escl_close(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "ORBLITE") == 0) {
+ orblite_close(handle);
+ return;
+ }
} /* sane_hpaio_close() */
extern const SANE_Option_Descriptor * sane_hpaio_get_option_descriptor(SANE_Handle handle, SANE_Int option)
@@ -539,20 +553,34 @@ extern SANE_Status sane_hpaio_read(SANE_
/* Note, sane_cancel is called normally not just during IO abort situations. */
extern void sane_hpaio_cancel( SANE_Handle handle )
{
- if (strcmp(*((char **)handle), "MARVELL") == 0)
- return marvell_cancel(handle);
- if (strcmp(*((char **)handle), "SOAP") == 0)
- return soap_cancel(handle);
- if (strcmp(*((char **)handle), "SOAPHT") == 0)
- return soapht_cancel(handle);
- if (strcmp(*((char **)handle), "LEDM") == 0)
- return ledm_cancel(handle);
- if (strcmp(*((char **)handle), "SCL-PML") == 0)
- return sclpml_cancel(handle);
- if (strcmp(*((char **)handle), "ESCL") == 0)
- return escl_cancel(handle);
- if (strcmp(*((char **)handle), "ORBLITE") == 0)
- return orblite_cancel(handle);
+ if (strcmp(*((char **)handle), "MARVELL") == 0) {
+ marvell_cancel(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "SOAP") == 0) {
+ soap_cancel(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "SOAPHT") == 0) {
+ soapht_cancel(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "LEDM") == 0) {
+ ledm_cancel(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "SCL-PML") == 0) {
+ sclpml_cancel(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "ESCL") == 0) {
+ escl_cancel(handle);
+ return;
+ }
+ if (strcmp(*((char **)handle), "ORBLITE") == 0) {
+ orblite_cancel(handle);
+ return;
+ }
} /* sane_hpaio_cancel() */
extern SANE_Status sane_hpaio_set_io_mode(SANE_Handle handle, SANE_Bool nonBlocking)