ipp and lpr print transports: fixes 64 bit warnings

This commit is contained in:
Jérôme Duval 2013-05-10 21:29:34 +02:00
parent 14bf5c3248
commit f39eb5cf94
3 changed files with 4 additions and 3 deletions

View File

@ -93,7 +93,8 @@ IPPPrinterRoster::Listen()
packet[len] = '\0';
// Verify packet format
if (sscanf(packet, "%lx%lx%1023s", &type, &state, uri) == 3) {
if (sscanf(packet, "%" B_SCNx32 "%" B_SCNx32 "%1023s", &type, &state,
uri) == 3) {
IPPPrinter *printer = fPrinters.Get(uri);
if (!printer) {
printer = new IPPPrinter(uri, type);

View File

@ -64,7 +64,7 @@ IppTransport::IppTransport(BMessage *msg)
else
strcpy(__user, "baron");
sprintf(__file, "%s/%s@ipp.%ld", spool_path, __user, __jobid);
sprintf(__file, "%s/%s@ipp.%" B_PRId32, spool_path, __user, __jobid);
__fs.open(__file, ios::in | ios::out | ios::binary | ios::trunc);
if (__fs.good()) {

View File

@ -66,7 +66,7 @@ LprTransport::LprTransport(BMessage *msg)
}
dir.WriteAttr(LPR_JOB_ID, B_INT32_TYPE, 0, &fJobId, sizeof(fJobId));
sprintf(fFile, "%s/%s@ipp.%ld", spool_path, fUser, fJobId);
sprintf(fFile, "%s/%s@ipp.%" B_PRId32, spool_path, fUser, fJobId);
fStream.open(fFile, ios::in | ios::out | ios::binary | ios::trunc);
if (fStream.good()) {