summaryrefslogtreecommitdiff
path: root/libparted/fs
diff options
context:
space:
mode:
authorShin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>2019-08-14 10:59:18 +0900
committerBrian C. Lane <bcl@redhat.com>2020-11-05 16:32:07 -0800
commitf75af2cfbbd1a2d82ed3df4955014f73737ae13e (patch)
tree6eb9c6f11dddb24d4a42121c29315fd91125448e /libparted/fs
parent04ca93351a4e25c35562ef705b3d96c3743609ff (diff)
downloadparted-f75af2cfbbd1a2d82ed3df4955014f73737ae13e.tar.gz
libparted: Fix a GCC warning -Wunused-but-set-variable
GCC warns that a variable 'prealloc' defined for _generic_affs_probe() in fs/amiga/affs.c is set but its value is never used. CC amiga/affs.lo amiga/affs.c: In function '_generic_affs_probe': amiga/affs.c:54:35: warning: variable 'prealloc' set but not used [-Wunused-but-set-variable] 54 | int blocksize = 1, reserved = 2, prealloc = 0; | ^~~~~~~~ Remove the variable for simplicity and to avoid the warning. Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp> Signed-off-by: Brian C. Lane <bcl@redhat.com>
Diffstat (limited to 'libparted/fs')
-rw-r--r--libparted/fs/amiga/affs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libparted/fs/amiga/affs.c b/libparted/fs/amiga/affs.c
index 1fde17c..e7c2e47 100644
--- a/libparted/fs/amiga/affs.c
+++ b/libparted/fs/amiga/affs.c
@@ -52,20 +52,19 @@ _generic_affs_probe (PedGeometry* geom, uint32_t kind)
uint32_t *block;
PedSector root, len, pos;
struct PartitionBlock * part;
- int blocksize = 1, reserved = 2, prealloc = 0;
+ int blocksize = 1, reserved = 2;
PED_ASSERT (geom != NULL);
PED_ASSERT (geom->dev != NULL);
if (geom->dev->sector_size != 512)
return NULL;
- /* Finds the blocksize, prealloc and reserved values of the partition block */
+ /* Finds the blocksize and reserved values of the partition block */
if (!(part = ped_malloc (PED_SECTOR_SIZE_DEFAULT*blocksize))) {
ped_exception_throw(PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL,
_("%s : Failed to allocate partition block\n"), __func__);
goto error_part;
}
if (amiga_find_part(geom, part) != NULL) {
- prealloc = PED_BE32_TO_CPU (part->de_PreAlloc);
reserved = PED_BE32_TO_CPU (part->de_Reserved);
reserved = reserved == 0 ? 1 : reserved;
blocksize = PED_BE32_TO_CPU (part->de_SizeBlock)