Fixed some DBG format warnings.

Henning Meier-Geinitz <henning@meier-geinitz.de>
DEVEL_2_0_BRANCH-1
Henning Geinitz 2002-02-14 19:50:10 +00:00
rodzic 5765809cf9
commit 644a271538
5 zmienionych plików z 21 dodań i 12 usunięć

Wyświetl plik

@ -992,7 +992,7 @@ usb_high_scan_set_threshold (Mustek_Usb_Device * dev, SANE_Byte threshold)
SANE_Status SANE_Status
usb_high_scan_embed_gamma (Mustek_Usb_Device * dev, SANE_Word * gamma_table) 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); dev, gamma_table);
if (!dev->is_prepared) if (!dev->is_prepared)
{ {

Wyświetl plik

@ -292,7 +292,7 @@ usb_low_start_cmt_table (ma1017 * chip)
if (status != SANE_STATUS_GOOD || n != 2) if (status != SANE_STATUS_GOOD || n != 2)
{ {
DBG (3, "usb_low_start_cmt_table: can't write, wanted 2 bytes, " 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; return SANE_STATUS_IO_ERROR;
} }
chip->is_rowing = SANE_TRUE; chip->is_rowing = SANE_TRUE;
@ -330,7 +330,7 @@ usb_low_stop_cmt_table (ma1017 * chip)
if (status != SANE_STATUS_GOOD || n != 2) if (status != SANE_STATUS_GOOD || n != 2)
{ {
DBG (3, "usb_low_stop_cmt_table: couldn't write, wanted 2 bytes, wrote " 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; 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); status = sanei_usb_read_bulk (chip->fd, &read_byte, &n);
if (status != SANE_STATUS_GOOD || n != 1) if (status != SANE_STATUS_GOOD || n != 1)
{ {
DBG (3, "usb_low_stop_cmt_table: couldn't read, wanted 1 byte, got %ul " DBG (3, "usb_low_stop_cmt_table: couldn't read, wanted 1 byte, got %lu "
"bytes\n", (unsigned long) n); "bytes\n", (unsigned long int) n);
return SANE_STATUS_IO_ERROR; return SANE_STATUS_IO_ERROR;
} }
chip->is_rowing = SANE_FALSE; 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) if (status != SANE_STATUS_GOOD || n != 2)
{ {
DBG (3, "usb_low_write_reg: couldn't write, tried to write %d, " 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; return SANE_STATUS_IO_ERROR;
} }
DBG (7, "usb_low_write_reg: reg: 0x%02x, value: 0x%02x\n", 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) if (status != SANE_STATUS_GOOD || n != 2)
{ {
DBG (3, "usb_low_read_reg: couldn't write, tried to write %d, " 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; return SANE_STATUS_IO_ERROR;
} }
n = 1; n = 1;
status = sanei_usb_read_bulk (chip->fd, (SANE_Byte *) &read_byte, &n); status = sanei_usb_read_bulk (chip->fd, (SANE_Byte *) &read_byte, &n);
if (status != SANE_STATUS_GOOD || n != 1) if (status != SANE_STATUS_GOOD || n != 1)
{ {
DBG (3, "usb_low_read_reg: couldn't read, tried to read %ul, " DBG (3, "usb_low_read_reg: couldn't read, tried to read %lu, "
"wrote %ul: %s\n", (unsigned long) 1, "read %lu: %s\n", (unsigned long int) 1,
(unsigned long) n, sane_strstatus (status)); (unsigned long int) n, sane_strstatus (status));
return SANE_STATUS_IO_ERROR; return SANE_STATUS_IO_ERROR;
} }
if (data) if (data)

Wyświetl plik

@ -756,7 +756,8 @@ sane_open (SANE_String_Const full_name, SANE_Handle * meta_handle)
if (!dev) if (!dev)
{ {
DBG (1, 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); status = add_device (nd_name, &dev);
if (status != SANE_STATUS_GOOD) if (status != SANE_STATUS_GOOD)
{ {

Wyświetl plik

@ -1,5 +1,11 @@
CHANGES for the SANE Mustek USB backend 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: 2002-01-23:
* Fixed undefined operation warnings. * Fixed undefined operation warnings.

Wyświetl plik

@ -260,7 +260,7 @@ sanei_usb_open (SANE_String_Const devname, SANE_Int *fd)
{ {
if (!fd) if (!fd)
{ {
DBG (1, "sanei_usb_open: fd == NULL\n", fd); DBG (1, "sanei_usb_open: fd == NULL\n");
return SANE_STATUS_INVAL; return SANE_STATUS_INVAL;
} }
*fd = open (devname, O_RDWR); *fd = open (devname, O_RDWR);