#1991 closed defect (fixed)

cpukit/rtems/src/attr.c:29: warning: no previous prototype for 'rtems_interrupt_level_attribute'

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: score Version: 4.11
Severity: normal Keywords:
Cc: Blocked By:


compiling cpukit/rtems/src/attr.c raises this warning:
cpukit/rtems/src/attr.c:29: warning: no previous prototype for 'rtems_interrupt_level_attribute'

GCC is correct, the function 'rtems_interrupt_level_attribute' is not declared, nor is part of any public header in RTEMS.

A grep through the source tree, seems to indicate it is part of some Ada-API and is only used inside of the testsuite via API-violating hackery:

# grep -R rtems_interrupt_level_attribute cpukit c testsuites
cpukit/rtems/src/attr.c:rtems_attribute rtems_interrupt_level_attribute(
c/src/ada/rtems.ads: pragma Import (C, Interrupt_Level, "rtems_interrupt_level_attribute");
testsuites/sptests/sp37/sp37.doc: rtems_interrupt_level_attribute
testsuites/sptests/sp37/init.c:extern rtems_attribute rtems_interrupt_level_attribute(uint32_t level);
testsuites/sptests/sp37/init.c: level_attribute = rtems_interrupt_level_attribute( level );
testsuites/sptests/sp37/init.c: level_attribute = rtems_interrupt_level_attribute( level );
testsuites/sptests/ChangeLog: rtems_interrupt_level_attribute.
testsuites/sptests/ChangeLog: rtems_interrupt_level_attribute body.

No idea what to do about this.

Should this function only be useful as part of the Ada-API, it should be moved to libgnat.
Should this function be generally useful (I am having doubts, because it's not used anywhere), a declaration should be added to some public header.

Similar considerations apply to the variable/symbol "rtems_interrupt_mask" from the same file.

Change History (2)

comment:1 Changed on Feb 2, 2012 at 10:01:54 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Addressed in recent commit to head.

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

Note: See TracTickets for help on using tickets.