Fix compilation on Ubuntu 14.04

A couple of problems appeared on Ubuntu 14.04 (gcc 4.8.4) when we
turned on additional compiler flags with commit
519c4285cf. This patch fixes these
problems by adhering to the strict anti-aliasing rules and also
initializing the 'tfd' variable where the compile believed it
_could_ be used uninitialized.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Geoffroy Van Cutsem
2018-04-09 13:53:27 +02:00
committed by Jack Ren
parent f98a7ca90a
commit da1c860e8c
2 changed files with 5 additions and 5 deletions

View File

@@ -1478,7 +1478,7 @@ static void
atapi_mode_sense(struct ahci_port *p, int slot, uint8_t *cfis)
{
uint8_t *acmd;
uint32_t tfd;
uint32_t tfd =0;
uint8_t pc, code;
int len;