Commit per Jeremy Rand, fixes build on Dano compiler

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1097 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2002-09-20 11:06:06 +00:00
parent d5525d8c93
commit 15685713d1
+5 -5
View File
@@ -299,10 +299,10 @@ status_t BPropertyInfo::Unflatten(type_code code, const void *buffer,
// Main chunks // Main chunks
for (int32 pi = 0; pi < fPropCount; pi++) { for (int32 pi = 0; pi < fPropCount; pi++) {
fPropInfo[pi].name = strdup(static_cast<char *>(buffer) + flatData.Position()); fPropInfo[pi].name = strdup(static_cast<const char*>(buffer) + flatData.Position());
flatData.Seek(strlen(fPropInfo[pi].name) + 1, SEEK_CUR); flatData.Seek(strlen(fPropInfo[pi].name) + 1, SEEK_CUR);
fPropInfo[pi].usage = strdup(static_cast<char *>(buffer) + flatData.Position()); fPropInfo[pi].usage = strdup(static_cast<const char *>(buffer) + flatData.Position());
flatData.Seek(strlen(fPropInfo[pi].usage) + 1, SEEK_CUR); flatData.Seek(strlen(fPropInfo[pi].usage) + 1, SEEK_CUR);
flatData.Read(&fPropInfo[pi].extra_data, sizeof(fPropInfo[pi].extra_data)); flatData.Read(&fPropInfo[pi].extra_data, sizeof(fPropInfo[pi].extra_data));
@@ -345,7 +345,7 @@ status_t BPropertyInfo::Unflatten(type_code code, const void *buffer,
for (int32 j = 0; tmpInt != 0; j++) { for (int32 j = 0; tmpInt != 0; j++) {
flatData.Seek(-sizeof(tmpInt), SEEK_CUR); flatData.Seek(-sizeof(tmpInt), SEEK_CUR);
fPropInfo[pi].ctypes[i].pairs[j].name = fPropInfo[pi].ctypes[i].pairs[j].name =
strdup(static_cast<char *>(buffer) + flatData.Position()); strdup(static_cast<const char *>(buffer) + flatData.Position());
flatData.Seek(strlen(fPropInfo[pi].ctypes[i].pairs[j].name) + 1, SEEK_CUR); flatData.Seek(strlen(fPropInfo[pi].ctypes[i].pairs[j].name) + 1, SEEK_CUR);
flatData.Read(&fPropInfo[pi].ctypes[i].pairs[j].type, flatData.Read(&fPropInfo[pi].ctypes[i].pairs[j].type,
@@ -375,10 +375,10 @@ status_t BPropertyInfo::Unflatten(type_code code, const void *buffer,
flatData.Read(&fValueInfo[vi].kind, sizeof(fValueInfo[vi].kind)); flatData.Read(&fValueInfo[vi].kind, sizeof(fValueInfo[vi].kind));
flatData.Read(&fValueInfo[vi].value, sizeof(fValueInfo[vi].value)); flatData.Read(&fValueInfo[vi].value, sizeof(fValueInfo[vi].value));
fValueInfo[vi].name = strdup(static_cast<char *>(buffer) + flatData.Position()); fValueInfo[vi].name = strdup(static_cast<const char *>(buffer) + flatData.Position());
flatData.Seek(strlen(fValueInfo[vi].name) + 1, SEEK_CUR); flatData.Seek(strlen(fValueInfo[vi].name) + 1, SEEK_CUR);
fValueInfo[vi].usage = strdup(static_cast<char *>(buffer) + flatData.Position()); fValueInfo[vi].usage = strdup(static_cast<const char *>(buffer) + flatData.Position());
flatData.Seek(strlen(fValueInfo[vi].usage) + 1, SEEK_CUR); flatData.Seek(strlen(fValueInfo[vi].usage) + 1, SEEK_CUR);
flatData.Read(&fValueInfo[vi].extra_data, sizeof(fValueInfo[vi].extra_data)); flatData.Read(&fValueInfo[vi].extra_data, sizeof(fValueInfo[vi].extra_data));