fixes for 64 bits platforms.

merge-requests/1/head
Frank Zago 2004-11-13 19:43:01 +00:00
rodzic da05a875bc
commit 5cab9b20c7
3 zmienionych plików z 14 dodań i 12 usunięć

Wyświetl plik

@ -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);

Wyświetl plik

@ -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);

Wyświetl plik

@ -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;
}