diff --git a/headers/os/bluetooth/LinkKeyUtils.h b/headers/os/bluetooth/LinkKeyUtils.h index 5009735140..3abbb313d9 100644 --- a/headers/os/bluetooth/LinkKeyUtils.h +++ b/headers/os/bluetooth/LinkKeyUtils.h @@ -41,9 +41,9 @@ public: static linkkey_t FromString(const char *lkstr) { if (lkstr != NULL) { - int l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15; - size_t count = sscanf(lkstr, "%2X:%2X:%2X:%2X:%2X:%2X:%2X:%2X:" - "%2X:%2X:%2X:%2X:%2X:%2X:%2X:%2X", &l0, &l1, &l2, &l3, + uint8 l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15; + size_t count = sscanf(lkstr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx:" + "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhxs", &l0, &l1, &l2, &l3, &l4, &l5, &l6, &l7, &l8, &l9, &l10, &l11, &l12, &l13, &l14, &l15); diff --git a/headers/os/bluetooth/bdaddrUtils.h b/headers/os/bluetooth/bdaddrUtils.h index cec9fb8a69..9b86c32dd8 100644 --- a/headers/os/bluetooth/bdaddrUtils.h +++ b/headers/os/bluetooth/bdaddrUtils.h @@ -59,10 +59,10 @@ public: static bdaddr_t FromString(const char * addr) { - int b0, b1, b2, b3, b4, b5; + uint8 b0, b1, b2, b3, b4, b5; if (addr != NULL) { - size_t count = sscanf(addr, "%2X:%2X:%2X:%2X:%2X:%2X", + size_t count = sscanf(addr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &b5, &b4, &b3, &b2, &b1, &b0); if (count == 6) diff --git a/src/add-ons/print/drivers/pdf/source/PDFText.cpp b/src/add-ons/print/drivers/pdf/source/PDFText.cpp index e3c82f0c80..f7f6790ac9 100644 --- a/src/add-ons/print/drivers/pdf/source/PDFText.cpp +++ b/src/add-ons/print/drivers/pdf/source/PDFText.cpp @@ -320,10 +320,9 @@ void PDFWriter::ToPDFUnicode(const char *string, BString &unicode) { // PDFlib requires BOM at begin and two 0 at end of string - char marker[3] = { 0xfe, 0xff, 0}; // byte order marker BString s; ToUnicode(string, s); - unicode << marker; + unicode << "\xfe\xff"; int32 len = s.Length()+2; char* buf = unicode.LockBuffer(len + 2); // reserve space for two additional '\0'