#1976 closed defect (fixed)

c/src/libchip/serial/z85c30.c:707:18: warning: variable 'ulCtrlPort2' 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: gedare@… Blocked By:
Blocking:

Description

GCC raises the warning from the subject, which is pointing to this code:

...
Z85C30_STATIC void z85c30_initialize_interrupts(

int minor

)
{

uint32_t ulCtrlPort1;
uint32_t ulCtrlPort2;
setRegister_f setReg;

ulCtrlPort1 = Console_Port_Tbl[minor]->ulCtrlPort1;
ulCtrlPort2 = Console_Port_Tbl[minor]->ulCtrlPort2;
setReg = Console_Port_Tbl[minor]->setRegister;

...

=> ulCtrlPort2 is not used.

Removing the 2 lines referring to ulCtrlPort2 would silence GCC,
but I am not sure if this warning actually points to a defect.

It seems to me, as if the original author of this code had wanted to initialize something related to "ulCtrlPort2", which was never implemented, lost or else throughout this file's history - I don't know.

Change History (3)

comment:1 Changed on Apr 12, 2014 at 12:30:42 AM by Gedare Bloom

Resolution: fixed
Status: newclosed, gedare@rtems.org

Someone removed the lines.

comment:2 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:3 Changed on Oct 10, 2017 at 6:35:44 AM by Sebastian Huber

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