kopia lustrzana https://gitlab.com/sane-project/backends
fixes for 64 bits platforms.
rodzic
da05a875bc
commit
5cab9b20c7
|
@ -1089,8 +1089,8 @@ sanei_pa4s2_scsi_pp_reg_select (int fd, int reg)
|
|||
DBG (6, "sanei_pa4s2_scsi_pp_reg_select: selecting register %u at port '%s'\n",
|
||||
(int) reg, pplist.portv[fd]->name);
|
||||
#else
|
||||
DBG (6, "sanei_pa4s2_scsi_pp_reg_select: selecting register %u at 0x%03x\n",
|
||||
(int) reg, port[fd].base);
|
||||
DBG (6, "sanei_pa4s2_scsi_pp_reg_select: selecting register %u at 0x%03lx\n",
|
||||
(int) reg, (u_long)port[fd].base);
|
||||
#endif
|
||||
|
||||
outbyte0 (fd, reg | 0x58);
|
||||
|
|
|
@ -1928,8 +1928,8 @@ issue (struct req *req)
|
|||
{
|
||||
if (rp->running)
|
||||
{
|
||||
DBG (1, "sanei_scsi.issue: bad write (errno=%i) %s %i\n",
|
||||
errno, strerror (errno), nwritten);
|
||||
DBG (1, "sanei_scsi.issue: bad write (errno=%i) %s %li\n",
|
||||
errno, strerror (errno), (long)nwritten);
|
||||
rp->done = 1;
|
||||
if (errno == ENOMEM)
|
||||
{
|
||||
|
@ -2107,8 +2107,8 @@ issue (struct req *req)
|
|||
{
|
||||
DBG (1,
|
||||
"sanei_scsi_req_enter2 warning: truncating write data "
|
||||
"from requested %i bytes to allowed %i bytes\n",
|
||||
src_size, fdp->buffersize);
|
||||
"from requested %li bytes to allowed %li bytes\n",
|
||||
(long)src_size, (long)fdp->buffersize);
|
||||
src_size = fdp->buffersize;
|
||||
}
|
||||
req->sgdata.sg3.hdr.dxfer_len = src_size;
|
||||
|
@ -2122,8 +2122,8 @@ issue (struct req *req)
|
|||
if (cmd_size > MAX_CDB)
|
||||
{
|
||||
DBG (1, "sanei_scsi_req_enter2 warning: truncating write data "
|
||||
"from requested %i bytes to allowed %i bytes\n",
|
||||
cmd_size, MAX_CDB);
|
||||
"from requested %li bytes to allowed %i bytes\n",
|
||||
(long)cmd_size, MAX_CDB);
|
||||
cmd_size = MAX_CDB;
|
||||
}
|
||||
memcpy (req->sgdata.sg3.data, cmd, cmd_size);
|
||||
|
|
|
@ -211,8 +211,9 @@ sanei_w_array (Wire * w, SANE_Word * len_ptr, void **v,
|
|||
|| (w->allocated_memory + len * element_size) > MAX_MEM)
|
||||
{
|
||||
DBG (0, "sanei_w_array: DECODE: maximum amount of allocated memory "
|
||||
"exceeded (limit: %u, new allocation: %u, total: %u bytes)\n",
|
||||
MAX_MEM, len * element_size, MAX_MEM + len * element_size);
|
||||
"exceeded (limit: %u, new allocation: %lu, total: %lu bytes)\n",
|
||||
MAX_MEM, (unsigned long)(len * element_size),
|
||||
(unsigned long)(MAX_MEM + len * element_size));
|
||||
w->status = ENOMEM;
|
||||
return;
|
||||
}
|
||||
|
@ -289,8 +290,9 @@ sanei_w_ptr (Wire * w, void **v, WireCodecFunc w_value, size_t value_size)
|
|||
if (value_size > MAX_MEM)
|
||||
{
|
||||
DBG (0, "sanei_w_ptr: DECODE: maximum amount of allocated memory "
|
||||
"exceeded (limit: %u, new allocation: %u, total: %u bytes)\n",
|
||||
MAX_MEM, value_size, (w->allocated_memory + value_size));
|
||||
"exceeded (limit: %u, new allocation: %lu, total: %lu bytes)\n",
|
||||
MAX_MEM, (unsigned long)value_size,
|
||||
(unsigned long)(w->allocated_memory + value_size));
|
||||
w->status = ENOMEM;
|
||||
return;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue