hplip/fix-no-return-in-nonvoid-function.diff

137 lines
5.5 KiB
Diff

--- scan/sane/hpaio.c.orig 2012-06-18 12:42:51.000000000 +0200
+++ scan/sane/hpaio.c 2012-06-25 16:30:00.364432019 +0200
@@ -332,121 +332,132 @@
if (ma.scantype == HPMUD_SCANTYPE_SOAP)
return soap_open(devicename, pHandle);
if (ma.scantype == HPMUD_SCANTYPE_SOAPHT)
return soapht_open(devicename, pHandle);
if (ma.scantype == HPMUD_SCANTYPE_LEDM)
return ledm_open(devicename, pHandle);
if ((ma.scantype == HPMUD_SCANTYPE_SCL) || (ma.scantype == HPMUD_SCANTYPE_PML))
return sclpml_open(devicename, pHandle);
+
+ return SANE_STATUS_UNSUPPORTED;
} /* sane_hpaio_open() */
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);
+
+ return SANE_STATUS_UNSUPPORTED;
} /* sane_hpaio_close() */
extern const SANE_Option_Descriptor * sane_hpaio_get_option_descriptor(SANE_Handle handle, SANE_Int option)
{
if (strcmp(*((char **)handle), "MARVELL") == 0)
return marvell_get_option_descriptor(handle, option);
if (strcmp(*((char **)handle), "SOAP") == 0)
return soap_get_option_descriptor(handle, option);
if (strcmp(*((char **)handle), "SOAPHT") == 0)
return soapht_get_option_descriptor(handle, option);
if (strcmp(*((char **)handle), "LEDM") == 0)
return ledm_get_option_descriptor(handle, option);
if (strcmp(*((char **)handle), "SCL-PML") == 0)
return sclpml_get_option_descriptor(handle, option);
+
+ return 0;
} /* sane_hpaio_get_option_descriptor() */
extern SANE_Status sane_hpaio_control_option(SANE_Handle handle, SANE_Int option, SANE_Action action, void * pValue, SANE_Int * pInfo )
{
if (strcmp(*((char **)handle), "MARVELL") == 0)
return marvell_control_option(handle, option, action, pValue, pInfo);
if (strcmp(*((char **)handle), "SOAP") == 0)
return soap_control_option(handle, option, action, pValue, pInfo);
if (strcmp(*((char **)handle), "SOAPHT") == 0)
return soapht_control_option(handle, option, action, pValue, pInfo);
if (strcmp(*((char **)handle), "LEDM") == 0)
return ledm_control_option(handle, option, action, pValue, pInfo);
if (strcmp(*((char **)handle), "SCL-PML") == 0)
return sclpml_control_option(handle, option, action, pValue, pInfo);
+ return SANE_STATUS_UNSUPPORTED;
} /* sane_hpaio_control_option() */
extern SANE_Status sane_hpaio_get_parameters(SANE_Handle handle, SANE_Parameters *pParams)
{
if (strcmp(*((char **)handle), "MARVELL") == 0)
return marvell_get_parameters(handle, pParams);
if (strcmp(*((char **)handle), "SOAP") == 0)
return soap_get_parameters(handle, pParams);
if (strcmp(*((char **)handle), "SOAPHT") == 0)
return soapht_get_parameters(handle, pParams);
if (strcmp(*((char **)handle), "LEDM") == 0)
return ledm_get_parameters(handle, pParams);
if (strcmp(*((char **)handle), "SCL-PML") == 0)
return sclpml_get_parameters(handle, pParams);
+ return SANE_STATUS_UNSUPPORTED;
} /* sane_hpaio_get_parameters() */
extern SANE_Status sane_hpaio_start(SANE_Handle handle)
{
if (strcmp(*((char **)handle), "MARVELL") == 0)
return marvell_start(handle);
if (strcmp(*((char **)handle), "SOAP") == 0)
return soap_start(handle);
if (strcmp(*((char **)handle), "SOAPHT") == 0)
return soapht_start(handle);
if (strcmp(*((char **)handle), "LEDM") == 0)
return ledm_start(handle);
if (strcmp(*((char **)handle), "SCL-PML") == 0)
return sclpml_start(handle);
+ return SANE_STATUS_UNSUPPORTED;
} /* sane_hpaio_start() */
extern SANE_Status sane_hpaio_read(SANE_Handle handle, SANE_Byte *data, SANE_Int maxLength, SANE_Int *pLength)
{
if (strcmp(*((char **)handle), "LEDM") == 0)
return ledm_read(handle, data, maxLength, pLength);
if (strcmp(*((char **)handle), "MARVELL") == 0)
return marvell_read(handle, data, maxLength, pLength);
if (strcmp(*((char **)handle), "SOAP") == 0)
return soap_read(handle, data, maxLength, pLength);
if (strcmp(*((char **)handle), "SOAPHT") == 0)
return soapht_read(handle, data, maxLength, pLength);
if (strcmp(*((char **)handle), "SCL-PML") == 0)
return sclpml_read(handle, data, maxLength, pLength);
+ return SANE_STATUS_UNSUPPORTED;
} /* sane_hpaio_read() */
/* 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);
-
+
+ return SANE_STATUS_UNSUPPORTED;
} /* sane_hpaio_cancel() */
extern SANE_Status sane_hpaio_set_io_mode(SANE_Handle handle, SANE_Bool nonBlocking)
{
return SANE_STATUS_UNSUPPORTED;
}
extern SANE_Status sane_hpaio_get_select_fd(SANE_Handle handle, SANE_Int *pFd)