Fix more GCC4 narrowing conversion warnings.
* Code style would be to fix.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user