Skip to content

Commit

Permalink
error: implicit conversion loses precision when running make (Apple c…
Browse files Browse the repository at this point in the history
…lang version 13.0.0)

Signed-off-by: rheno <rhenobudiasa@yahoo.com>
  • Loading branch information
rheno committed Oct 15, 2021
1 parent adc4ea8 commit dfb6fdd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/pci_ahci.c
Expand Up @@ -214,8 +214,8 @@ static inline void lba_to_msf(uint8_t *buf, int lba)
{
lba += 150;
buf[0] = (uint8_t) ((lba / 75) / 60);
buf[1] = (lba / 75) % 60;
buf[2] = lba % 75;
buf[1] = (uint8_t) ((lba / 75) % 60);
buf[2] = (uint8_t) (lba % 75);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion src/lib/vmm/io/vatpit.c
Expand Up @@ -200,7 +200,7 @@ pit_update_counter(struct vatpit *vatpit, struct channel *c, bool latch)

delta_ticks = (sbinuptime() - c->now_sbt) / vatpit->freq_sbt;

lval = c->initial - delta_ticks % c->initial;
lval = (uint16_t) (c->initial - delta_ticks % c->initial);

if (latch) {
c->olbyte = 2;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/vmm/vmm_instruction_emul.c
Expand Up @@ -1376,7 +1376,7 @@ emulate_bittest(void *vm, int vcpuid, uint64_t gpa, struct vie *vie,
* "Range of Bit Positions Specified by Bit Offset Operands"
*/
bitmask = vie->opsize * 8 - 1;
bitoff = vie->immediate & bitmask;
bitoff = (int) (vie->immediate & bitmask);

/* Copy the bit into the Carry flag in %rflags */
if (val & (1UL << bitoff))
Expand Down

0 comments on commit dfb6fdd

Please sign in to comment.