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
+2 -1
View File
@@ -93,7 +93,8 @@ IPPPrinterRoster::Listen()
packet[len] = '\0'; packet[len] = '\0';
// Verify packet format // 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); IPPPrinter *printer = fPrinters.Get(uri);
if (!printer) { if (!printer) {
printer = new IPPPrinter(uri, type); printer = new IPPPrinter(uri, type);
@@ -64,7 +64,7 @@ IppTransport::IppTransport(BMessage *msg)
else else
strcpy(__user, "baron"); 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); __fs.open(__file, ios::in | ios::out | ios::binary | ios::trunc);
if (__fs.good()) { if (__fs.good()) {
@@ -66,7 +66,7 @@ LprTransport::LprTransport(BMessage *msg)
} }
dir.WriteAttr(LPR_JOB_ID, B_INT32_TYPE, 0, &fJobId, sizeof(fJobId)); 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); fStream.open(fFile, ios::in | ios::out | ios::binary | ios::trunc);
if (fStream.good()) { if (fStream.good()) {