kopia lustrzana https://gitlab.com/sane-project/backends
Fixed some DBG format warnings.
Henning Meier-Geinitz <henning@meier-geinitz.de>DEVEL_2_0_BRANCH-1
rodzic
5765809cf9
commit
644a271538
|
@ -992,7 +992,7 @@ usb_high_scan_set_threshold (Mustek_Usb_Device * dev, SANE_Byte threshold)
|
|||
SANE_Status
|
||||
usb_high_scan_embed_gamma (Mustek_Usb_Device * dev, SANE_Word * gamma_table)
|
||||
{
|
||||
DBG (5, "usb_high_scan_embed_gamma: start, dev=%p, gamma_table=%d\n",
|
||||
DBG (5, "usb_high_scan_embed_gamma: start, dev=%p, gamma_table=%p\n",
|
||||
dev, gamma_table);
|
||||
if (!dev->is_prepared)
|
||||
{
|
||||
|
|
|
@ -292,7 +292,7 @@ usb_low_start_cmt_table (ma1017 * chip)
|
|||
if (status != SANE_STATUS_GOOD || n != 2)
|
||||
{
|
||||
DBG (3, "usb_low_start_cmt_table: can't write, wanted 2 bytes, "
|
||||
"wrote %ul bytes\n", (unsigned long) n);
|
||||
"wrote %lu bytes\n", (unsigned long int) n);
|
||||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
chip->is_rowing = SANE_TRUE;
|
||||
|
@ -330,7 +330,7 @@ usb_low_stop_cmt_table (ma1017 * chip)
|
|||
if (status != SANE_STATUS_GOOD || n != 2)
|
||||
{
|
||||
DBG (3, "usb_low_stop_cmt_table: couldn't write, wanted 2 bytes, wrote "
|
||||
"%ul bytes\n", (unsigned long) n);
|
||||
"%lu bytes\n", (unsigned long int) n);
|
||||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
|
||||
|
@ -338,8 +338,8 @@ usb_low_stop_cmt_table (ma1017 * chip)
|
|||
status = sanei_usb_read_bulk (chip->fd, &read_byte, &n);
|
||||
if (status != SANE_STATUS_GOOD || n != 1)
|
||||
{
|
||||
DBG (3, "usb_low_stop_cmt_table: couldn't read, wanted 1 byte, got %ul "
|
||||
"bytes\n", (unsigned long) n);
|
||||
DBG (3, "usb_low_stop_cmt_table: couldn't read, wanted 1 byte, got %lu "
|
||||
"bytes\n", (unsigned long int) n);
|
||||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
chip->is_rowing = SANE_FALSE;
|
||||
|
@ -2686,7 +2686,8 @@ usb_low_write_reg (ma1017 * chip, SANE_Byte reg_no, SANE_Byte data)
|
|||
if (status != SANE_STATUS_GOOD || n != 2)
|
||||
{
|
||||
DBG (3, "usb_low_write_reg: couldn't write, tried to write %d, "
|
||||
"wrote %ul: %s\n", 2, (unsigned long) n, sane_strstatus (status));
|
||||
"wrote %lu: %s\n", 2, (unsigned long int) n,
|
||||
sane_strstatus (status));
|
||||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
DBG (7, "usb_low_write_reg: reg: 0x%02x, value: 0x%02x\n",
|
||||
|
@ -2726,16 +2727,17 @@ usb_low_read_reg (ma1017 * chip, SANE_Byte reg_no, SANE_Byte *data)
|
|||
if (status != SANE_STATUS_GOOD || n != 2)
|
||||
{
|
||||
DBG (3, "usb_low_read_reg: couldn't write, tried to write %d, "
|
||||
"wrote %ul: %s\n", 2, (unsigned long) n, sane_strstatus (status));
|
||||
"wrote %lu: %s\n", 2, (unsigned long int) n,
|
||||
sane_strstatus (status));
|
||||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
n = 1;
|
||||
status = sanei_usb_read_bulk (chip->fd, (SANE_Byte *) &read_byte, &n);
|
||||
if (status != SANE_STATUS_GOOD || n != 1)
|
||||
{
|
||||
DBG (3, "usb_low_read_reg: couldn't read, tried to read %ul, "
|
||||
"wrote %ul: %s\n", (unsigned long) 1,
|
||||
(unsigned long) n, sane_strstatus (status));
|
||||
DBG (3, "usb_low_read_reg: couldn't read, tried to read %lu, "
|
||||
"read %lu: %s\n", (unsigned long int) 1,
|
||||
(unsigned long int) n, sane_strstatus (status));
|
||||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
if (data)
|
||||
|
|
|
@ -756,7 +756,8 @@ sane_open (SANE_String_Const full_name, SANE_Handle * meta_handle)
|
|||
if (!dev)
|
||||
{
|
||||
DBG (1,
|
||||
"sane_open: device %s not found, trying to register it anyway\n");
|
||||
"sane_open: device %s not found, trying to register it anyway\n",
|
||||
nd_name);
|
||||
status = add_device (nd_name, &dev);
|
||||
if (status != SANE_STATUS_GOOD)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
CHANGES for the SANE Mustek USB backend
|
||||
|
||||
2002-02-14:
|
||||
* Fixed some problems with wrong formats in DBG statements.
|
||||
|
||||
2002-02-09
|
||||
* Fixed wrong output in usb_low_read_reg().
|
||||
|
||||
2002-01-23:
|
||||
* Fixed undefined operation warnings.
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ sanei_usb_open (SANE_String_Const devname, SANE_Int *fd)
|
|||
{
|
||||
if (!fd)
|
||||
{
|
||||
DBG (1, "sanei_usb_open: fd == NULL\n", fd);
|
||||
DBG (1, "sanei_usb_open: fd == NULL\n");
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
*fd = open (devname, O_RDWR);
|
||||
|
|
Ładowanie…
Reference in New Issue