ramfs: enable -Werror
Change-Id: I02600442bb2cb28182e6fd2da4eb849621c1b877 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5439 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
6325257204
commit
c8641d3a23
@@ -733,7 +733,7 @@ rule ArchitectureSetupWarnings architecture
|
|||||||
EnableWerror src add-ons kernel file_systems nfs4 ;
|
EnableWerror src add-ons kernel file_systems nfs4 ;
|
||||||
# EnableWerror src add-ons kernel file_systems ntfs ;
|
# EnableWerror src add-ons kernel file_systems ntfs ;
|
||||||
EnableWerror src add-ons kernel file_systems packagefs ;
|
EnableWerror src add-ons kernel file_systems packagefs ;
|
||||||
# EnableWerror src add-ons kernel file_systems ramfs ;
|
EnableWerror src add-ons kernel file_systems ramfs ;
|
||||||
EnableWerror src add-ons kernel file_systems reiserfs ;
|
EnableWerror src add-ons kernel file_systems reiserfs ;
|
||||||
EnableWerror src add-ons kernel file_systems udf ;
|
EnableWerror src add-ons kernel file_systems udf ;
|
||||||
EnableWerror src add-ons kernel file_systems userlandfs ;
|
EnableWerror src add-ons kernel file_systems userlandfs ;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ Attribute::WriteAt(off_t offset, const void *buffer, size_t size,
|
|||||||
{
|
{
|
||||||
// get the current key for the attribute
|
// get the current key for the attribute
|
||||||
uint8 oldKey[kMaxIndexKeyLength];
|
uint8 oldKey[kMaxIndexKeyLength];
|
||||||
size_t oldLength;
|
size_t oldLength = kMaxIndexKeyLength;
|
||||||
GetKey(oldKey, &oldLength);
|
GetKey(oldKey, &oldLength);
|
||||||
|
|
||||||
// write the new value
|
// write the new value
|
||||||
@@ -80,12 +80,12 @@ Attribute::WriteAt(off_t offset, const void *buffer, size_t size,
|
|||||||
|
|
||||||
// If there is an index and a change has been made within the key, notify
|
// If there is an index and a change has been made within the key, notify
|
||||||
// the index.
|
// the index.
|
||||||
if (offset < kMaxIndexKeyLength && size > 0 && fIndex)
|
if (offset < (off_t)kMaxIndexKeyLength && size > 0 && fIndex)
|
||||||
fIndex->Changed(this, oldKey, oldLength);
|
fIndex->Changed(this, oldKey, oldLength);
|
||||||
|
|
||||||
// update live queries
|
// update live queries
|
||||||
uint8 newKey[kMaxIndexKeyLength];
|
uint8 newKey[kMaxIndexKeyLength];
|
||||||
size_t newLength;
|
size_t newLength = kMaxIndexKeyLength;
|
||||||
GetKey(newKey, &newLength);
|
GetKey(newKey, &newLength);
|
||||||
GetVolume()->UpdateLiveQueries(NULL, fNode, GetName(), fType, oldKey,
|
GetVolume()->UpdateLiveQueries(NULL, fNode, GetName(), fType, oldKey,
|
||||||
oldLength, newKey, newLength);
|
oldLength, newKey, newLength);
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ AttributeIndexImpl::Changed(Attribute *attribute, const uint8 *oldKey,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// re-insert the attribute
|
// re-insert the attribute
|
||||||
if (fKeyLength > 0 && attribute->GetSize() != fKeyLength) {
|
if (fKeyLength > 0 && attribute->GetSize() != (off_t)fKeyLength) {
|
||||||
attribute->SetIndex(this, false);
|
attribute->SetIndex(this, false);
|
||||||
} else {
|
} else {
|
||||||
error = fAttributes->Insert(attribute);
|
error = fAttributes->Insert(attribute);
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ DataContainer::WriteAt(off_t offset, const void *_buffer, size_t size,
|
|||||||
return error;
|
return error;
|
||||||
|
|
||||||
// resize the container, if necessary
|
// resize the container, if necessary
|
||||||
if ((offset + size) > fSize)
|
if ((offset + (off_t)size) > fSize)
|
||||||
error = Resize(offset + size);
|
error = Resize(offset + size);
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|||||||
Reference in New Issue
Block a user