[Bug 1975] New: c/src/libchip/ide/ata.c:424:25: warning: variable 'dev' set but not used

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Wed Nov 30 18:22:11 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1975

           Summary: c/src/libchip/ide/ata.c:424:25: warning: variable
                    'dev' set but not used
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: misc
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: ralf.corsepius at rtems.org


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.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list