From 16a112ae7becda2dd26d0c83dd16c3b6d7dbf6b7 Mon Sep 17 00:00:00 2001 From: PulkoMandy Date: Mon, 24 Jul 2023 14:55:28 +0200 Subject: [PATCH] ext2: fix unused-but-set variable This variable was introduced in hrev38573 which is the conclusion of a GSoC project by jvff to add write support to the ext2 driver. It has been unused for 13 years, I think it is safe to remove. Change-Id: I8ae4635dbc39f108b769d90b92e5545f8183a10d Reviewed-on: https://review.haiku-os.org/c/haiku/+/6715 Reviewed-by: Fredrik Holmqvist --- src/add-ons/kernel/file_systems/ext2/BlockAllocator.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/ext2/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/ext2/BlockAllocator.cpp index 5151f8cd5d..a00174c646 100644 --- a/src/add-ons/kernel/file_systems/ext2/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/ext2/BlockAllocator.cpp @@ -737,7 +737,6 @@ BlockAllocator::Allocate(Transaction& transaction, Inode* inode, return B_BAD_VALUE; uint32 group = inode->ID() / fVolume->InodesPerGroup(); - uint32 preferred = 0; if (inode->Size() > 0) { // Try to allocate near it's last blocks @@ -797,7 +796,6 @@ BlockAllocator::Allocate(Transaction& transaction, Inode* inode, } group = (lastBlock - fFirstBlock) / fBlocksPerGroup; - preferred = (lastBlock - fFirstBlock) % fBlocksPerGroup + 1; } // TODO: Apply some more policies