Skip to content

Commit 5e0ba57

Browse files
committed
Disk (BSD): silence compiler warnings
1 parent d89263c commit 5e0ba57

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/detection/disk/disk_bsd.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static const char* detectFsLabel(struct statfs* fs, FFDisk* disk)
5252
return NULL;
5353
}
5454
#else
55-
static const char* detectFsLabel(struct statfs* fs, FFDisk* disk)
55+
static const char* detectFsLabel(FF_MAYBE_UNUSED struct statfs* fs, FF_MAYBE_UNUSED FFDisk* disk)
5656
{
5757
return "Fastfetch was compiled without libgeom support";
5858
}
@@ -159,13 +159,13 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
159159

160160
FFDisk* disk = ffListAdd(disks);
161161

162-
disk->bytesTotal = (uint64_t)fs->f_blocks * fs->f_bsize;
163-
disk->bytesFree = (uint64_t)fs->f_bfree * fs->f_bsize;
164-
disk->bytesAvailable = (uint64_t)fs->f_bavail * fs->f_bsize;
162+
disk->bytesTotal = (uint64_t)fs->f_blocks * (uint64_t)fs->f_bsize;
163+
disk->bytesFree = (uint64_t)fs->f_bfree * (uint64_t)fs->f_bsize;
164+
disk->bytesAvailable = (uint64_t)fs->f_bavail * (uint64_t)fs->f_bsize;
165165
disk->bytesUsed = 0; // To be filled in ./disk.c
166166

167167
disk->filesTotal = (uint32_t) fs->f_files;
168-
disk->filesUsed = (uint32_t) (fs->f_files - fs->f_ffree);
168+
disk->filesUsed = (uint32_t) fs->f_files - (uint32_t) fs->f_ffree;
169169

170170
ffStrbufInitS(&disk->mountFrom, fs->f_mntfromname);
171171
ffStrbufInitS(&disk->mountpoint, fs->f_mntonname);

0 commit comments

Comments
 (0)