#1975 closed defect (fixed)

c/src/libchip/ide/ata.c:424:25: warning: variable 'dev' set but not used

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.11
Severity: normal Keywords:
Cc: chrisj@…, sebastian.huber@… Blocked By:
Blocking:

Description

GCC raises these warnings:

c/src/libchip/ide/ata.c:424:25: warning: variable 'dev' set but not used
c/src/libchip/ide/ata.c:746:21: warning: variable 'dev' set but not used
c/src/libchip/ide/ata.c:790:21: warning: variable 'dev' set but not used

All these places condense to this:
...

uint8_t i, dev;

...

/* get ATA device identifier (0 or 1) */
dev = areq->regs.regs[IDE_REGISTER_DEVICE_HEAD] &

IDE_REGISTER_DEVICE_HEAD_DEV;

...
[dev is not being used later on]

Looks like a non-completed attempt to support primary/secondary ata devices to me, which in its present shape doesn't have any function.

No idea what to do about this - Simpliest, least intrusive measure would be to "#ifdef 0" out these questionable places.

Change History (5)

comment:1 Changed on Nov 30, 2011 at 5:22:25 PM by Ralf Corsepius

Cc: Sebastian Huber added

comment:2 Changed on Dec 5, 2011 at 12:51:03 AM by Chris Johns

Cc: Chris Johns added

comment:3 Changed on Dec 5, 2011 at 8:24:16 AM by Sebastian Huber

Resolution: fixed
Status: newclosed

I disabled these assignments with "#if 0". This ATA support has so many issues, it is a waste of time to improve it.

comment:4 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

comment:5 Changed on Oct 10, 2017 at 6:35:44 AM by Sebastian Huber

Component: miscunspecified
Note: See TracTickets for help on using tickets.