Skip to content

Commit

Permalink
disk: BIOS: Work around bogus GCC warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsuki committed May 7, 2024
1 parent 10e0ca6 commit 71cfe73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/drivers/disk.s2.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void disk_create_index(void) {
volume_index = ext_mem_alloc(sizeof(struct volume) * MAX_VOLUMES);

// Disk count (only non-removable) at 0040:0075
uint8_t *bda_disk_count = (void *)rm_desegment(0x0040, 0x0075);
uint8_t bda_disk_count = mminb(rm_desegment(0x0040, 0x0075));

int optical_indices = 1, hdd_indices = 1;

Expand Down Expand Up @@ -246,7 +246,7 @@ void disk_create_index(void) {
}
}

if (!is_removable && hdd_indices > *bda_disk_count) {
if (!is_removable && hdd_indices > bda_disk_count) {
continue;
}

Expand Down

0 comments on commit 71cfe73

Please sign in to comment.