diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index 9421ed89f8..602683b2c0 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -733,7 +733,7 @@ rule ArchitectureSetupWarnings architecture EnableWerror src add-ons kernel file_systems nfs4 ; # EnableWerror src add-ons kernel file_systems ntfs ; 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 udf ; EnableWerror src add-ons kernel file_systems userlandfs ; diff --git a/src/add-ons/kernel/file_systems/ramfs/Attribute.cpp b/src/add-ons/kernel/file_systems/ramfs/Attribute.cpp index 2a1196c6b6..66bcbd7b2e 100644 --- a/src/add-ons/kernel/file_systems/ramfs/Attribute.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/Attribute.cpp @@ -72,7 +72,7 @@ Attribute::WriteAt(off_t offset, const void *buffer, size_t size, { // get the current key for the attribute uint8 oldKey[kMaxIndexKeyLength]; - size_t oldLength; + size_t oldLength = kMaxIndexKeyLength; GetKey(oldKey, &oldLength); // 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 // the index. - if (offset < kMaxIndexKeyLength && size > 0 && fIndex) + if (offset < (off_t)kMaxIndexKeyLength && size > 0 && fIndex) fIndex->Changed(this, oldKey, oldLength); // update live queries uint8 newKey[kMaxIndexKeyLength]; - size_t newLength; + size_t newLength = kMaxIndexKeyLength; GetKey(newKey, &newLength); GetVolume()->UpdateLiveQueries(NULL, fNode, GetName(), fType, oldKey, oldLength, newKey, newLength); diff --git a/src/add-ons/kernel/file_systems/ramfs/AttributeIndexImpl.cpp b/src/add-ons/kernel/file_systems/ramfs/AttributeIndexImpl.cpp index 8a77a6baec..35df934a7c 100644 --- a/src/add-ons/kernel/file_systems/ramfs/AttributeIndexImpl.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/AttributeIndexImpl.cpp @@ -259,7 +259,7 @@ AttributeIndexImpl::Changed(Attribute *attribute, const uint8 *oldKey, } } // re-insert the attribute - if (fKeyLength > 0 && attribute->GetSize() != fKeyLength) { + if (fKeyLength > 0 && attribute->GetSize() != (off_t)fKeyLength) { attribute->SetIndex(this, false); } else { error = fAttributes->Insert(attribute); diff --git a/src/add-ons/kernel/file_systems/ramfs/DataContainer.cpp b/src/add-ons/kernel/file_systems/ramfs/DataContainer.cpp index 61f1107da1..bf224a1786 100644 --- a/src/add-ons/kernel/file_systems/ramfs/DataContainer.cpp +++ b/src/add-ons/kernel/file_systems/ramfs/DataContainer.cpp @@ -136,7 +136,7 @@ DataContainer::WriteAt(off_t offset, const void *_buffer, size_t size, return error; // resize the container, if necessary - if ((offset + size) > fSize) + if ((offset + (off_t)size) > fSize) error = Resize(offset + size); if (error != B_OK) return error;