Fixed gcc 4 32 and 64 bit warnings in the libbe_build code. This time ported
them back to the Haiku versions. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34262 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e48f3e5b7e
commit
41975f20f0
@ -504,7 +504,7 @@ BMessage::_PrintToStream(const char* indent) const
|
|||||||
if (isprint(*(char *)&value))
|
if (isprint(*(char *)&value))
|
||||||
printf("'%.4s'", (char *)&value);
|
printf("'%.4s'", (char *)&value);
|
||||||
else
|
else
|
||||||
printf("0x%lx", what);
|
printf("0x%" B_PRIx32, what);
|
||||||
printf(") {\n");
|
printf(") {\n");
|
||||||
|
|
||||||
if (fHeader == NULL || fFields == NULL || fData == NULL)
|
if (fHeader == NULL || fFields == NULL || fData == NULL)
|
||||||
@ -523,7 +523,7 @@ BMessage::_PrintToStream(const char* indent) const
|
|||||||
printf("%s %s = ", indent,
|
printf("%s %s = ", indent,
|
||||||
(char *)(fData + field->offset));
|
(char *)(fData + field->offset));
|
||||||
} else {
|
} else {
|
||||||
printf("%s %s[%ld] = ", indent,
|
printf("%s %s[%" B_PRIu32 "] = ", indent,
|
||||||
(char *)(fData + field->offset), j);
|
(char *)(fData + field->offset), j);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -541,7 +541,7 @@ BMessage::_PrintToStream(const char* indent) const
|
|||||||
size = *(uint32 *)pointer;
|
size = *(uint32 *)pointer;
|
||||||
pointer += sizeof(uint32);
|
pointer += sizeof(uint32);
|
||||||
printf("string(\"%s\", %ld bytes)\n", (char *)pointer,
|
printf("string(\"%s\", %ld bytes)\n", (char *)pointer,
|
||||||
size);
|
(long)size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -598,8 +598,9 @@ BMessage::_PrintToStream(const char* indent) const
|
|||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
BPrivate::entry_ref_unflatten(&ref, (char *)pointer, size);
|
BPrivate::entry_ref_unflatten(&ref, (char *)pointer, size);
|
||||||
|
|
||||||
printf("entry_ref(device=%ld, directory=%lld, "
|
printf("entry_ref(device=%d, directory=%" B_PRIdINO
|
||||||
"name=\"%s\", ", ref.device, ref.directory, ref.name);
|
", name=\"%s\", ", (int)ref.device, ref.directory,
|
||||||
|
ref.name);
|
||||||
|
|
||||||
BPath path(&ref);
|
BPath path(&ref);
|
||||||
printf("path=\"%s\")\n", path.Path());
|
printf("path=\"%s\")\n", path.Path());
|
||||||
@ -628,7 +629,7 @@ BMessage::_PrintToStream(const char* indent) const
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
printf("(type = '%.4s')(size = %ld)\n", (char *)&value,
|
printf("(type = '%.4s')(size = %ld)\n", (char *)&value,
|
||||||
size);
|
(long)size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,7 +344,7 @@ MessageAdapter::_FlattenR5Message(uint32 format, const BMessage *from,
|
|||||||
r5header->flags = flags;
|
r5header->flags = flags;
|
||||||
|
|
||||||
// store the header size - used for the checksum later
|
// store the header size - used for the checksum later
|
||||||
ssize_t headerSize = (uint32)pointer - (uint32)buffer;
|
ssize_t headerSize = (addr_t)pointer - (addr_t)buffer;
|
||||||
|
|
||||||
// collect and add the data
|
// collect and add the data
|
||||||
BMessage::field_header *field = messagePrivate.GetMessageFields();
|
BMessage::field_header *field = messagePrivate.GetMessageFields();
|
||||||
@ -422,7 +422,7 @@ MessageAdapter::_FlattenR5Message(uint32 format, const BMessage *from,
|
|||||||
pointer++;
|
pointer++;
|
||||||
|
|
||||||
// calculate the flattened size from the pointers
|
// calculate the flattened size from the pointers
|
||||||
r5header->flattened_size = (uint32)pointer - (uint32)buffer;
|
r5header->flattened_size = (addr_t)pointer - (addr_t)buffer;
|
||||||
r5header->checksum = CalculateChecksum((uint8 *)(buffer + 8),
|
r5header->checksum = CalculateChecksum((uint8 *)(buffer + 8),
|
||||||
headerSize - 8);
|
headerSize - 8);
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ entry_ref_unflatten(entry_ref *ref, const char *buffer, size_t size)
|
|||||||
memcpy((void *)&ref->directory, (const void *)buffer, sizeof(ref->directory));
|
memcpy((void *)&ref->directory, (const void *)buffer, sizeof(ref->directory));
|
||||||
buffer += sizeof(ref->directory);
|
buffer += sizeof(ref->directory);
|
||||||
|
|
||||||
if (ref->device != -1 && size > sizeof(ref->device)
|
if (ref->device != ~(dev_t)0 && size > sizeof(ref->device)
|
||||||
+ sizeof(ref->directory)) {
|
+ sizeof(ref->directory)) {
|
||||||
ref->set_name(buffer);
|
ref->set_name(buffer);
|
||||||
if (ref->name == NULL) {
|
if (ref->name == NULL) {
|
||||||
|
@ -552,7 +552,7 @@ BMessage::_PrintToStream(const char* indent) const
|
|||||||
if (isprint(*(char *)&value))
|
if (isprint(*(char *)&value))
|
||||||
printf("'%.4s'", (char *)&value);
|
printf("'%.4s'", (char *)&value);
|
||||||
else
|
else
|
||||||
printf("0x%lx", what);
|
printf("0x%" B_PRIx32, what);
|
||||||
printf(") {\n");
|
printf(") {\n");
|
||||||
|
|
||||||
if (fHeader == NULL || fFields == NULL || fData == NULL)
|
if (fHeader == NULL || fFields == NULL || fData == NULL)
|
||||||
@ -571,7 +571,7 @@ BMessage::_PrintToStream(const char* indent) const
|
|||||||
printf("%s %s = ", indent,
|
printf("%s %s = ", indent,
|
||||||
(char *)(fData + field->offset));
|
(char *)(fData + field->offset));
|
||||||
} else {
|
} else {
|
||||||
printf("%s %s[%ld] = ", indent,
|
printf("%s %s[%" B_PRIu32 "] = ", indent,
|
||||||
(char *)(fData + field->offset), j);
|
(char *)(fData + field->offset), j);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -589,7 +589,7 @@ BMessage::_PrintToStream(const char* indent) const
|
|||||||
size = *(uint32 *)pointer;
|
size = *(uint32 *)pointer;
|
||||||
pointer += sizeof(uint32);
|
pointer += sizeof(uint32);
|
||||||
printf("string(\"%s\", %ld bytes)\n", (char *)pointer,
|
printf("string(\"%s\", %ld bytes)\n", (char *)pointer,
|
||||||
size);
|
(long)size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -646,8 +646,9 @@ BMessage::_PrintToStream(const char* indent) const
|
|||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
BPrivate::entry_ref_unflatten(&ref, (char *)pointer, size);
|
BPrivate::entry_ref_unflatten(&ref, (char *)pointer, size);
|
||||||
|
|
||||||
printf("entry_ref(device=%ld, directory=%lld, "
|
printf("entry_ref(device=%d, directory=%" B_PRIdINO
|
||||||
"name=\"%s\", ", ref.device, ref.directory, ref.name);
|
", name=\"%s\", ", (int)ref.device, ref.directory,
|
||||||
|
ref.name);
|
||||||
|
|
||||||
BPath path(&ref);
|
BPath path(&ref);
|
||||||
printf("path=\"%s\")\n", path.Path());
|
printf("path=\"%s\")\n", path.Path());
|
||||||
@ -676,7 +677,7 @@ BMessage::_PrintToStream(const char* indent) const
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
printf("(type = '%.4s')(size = %ld)\n", (char *)&value,
|
printf("(type = '%.4s')(size = %ld)\n", (char *)&value,
|
||||||
size);
|
(long)size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -411,7 +411,7 @@ MessageAdapter::_FlattenR5Message(uint32 format, const BMessage *from,
|
|||||||
r5header->flags = flags;
|
r5header->flags = flags;
|
||||||
|
|
||||||
// store the header size - used for the checksum later
|
// store the header size - used for the checksum later
|
||||||
ssize_t headerSize = (uint32)pointer - (uint32)buffer;
|
ssize_t headerSize = (addr_t)pointer - (addr_t)buffer;
|
||||||
|
|
||||||
// collect and add the data
|
// collect and add the data
|
||||||
BMessage::field_header *field = messagePrivate.GetMessageFields();
|
BMessage::field_header *field = messagePrivate.GetMessageFields();
|
||||||
@ -489,7 +489,7 @@ MessageAdapter::_FlattenR5Message(uint32 format, const BMessage *from,
|
|||||||
pointer++;
|
pointer++;
|
||||||
|
|
||||||
// calculate the flattened size from the pointers
|
// calculate the flattened size from the pointers
|
||||||
r5header->flattened_size = (uint32)pointer - (uint32)buffer;
|
r5header->flattened_size = (addr_t)pointer - (addr_t)buffer;
|
||||||
r5header->checksum = CalculateChecksum((uint8 *)(buffer + 8),
|
r5header->checksum = CalculateChecksum((uint8 *)(buffer + 8),
|
||||||
headerSize - 8);
|
headerSize - 8);
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ entry_ref_unflatten(entry_ref *ref, const char *buffer, size_t size)
|
|||||||
memcpy((void *)&ref->directory, (const void *)buffer, sizeof(ref->directory));
|
memcpy((void *)&ref->directory, (const void *)buffer, sizeof(ref->directory));
|
||||||
buffer += sizeof(ref->directory);
|
buffer += sizeof(ref->directory);
|
||||||
|
|
||||||
if (ref->device != -1 && size > sizeof(ref->device)
|
if (ref->device != ~(dev_t)0 && size > sizeof(ref->device)
|
||||||
+ sizeof(ref->directory)) {
|
+ sizeof(ref->directory)) {
|
||||||
ref->set_name(buffer);
|
ref->set_name(buffer);
|
||||||
if (ref->name == NULL) {
|
if (ref->name == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user