[RTEMS Project] #4816: Wrong data type

RTEMS trac trac at rtems.org
Thu Jun 1 15:46:14 UTC 2023


#4816: Wrong data type
---------------------------+----------------------------
 Reporter:  Daniel Páscoa  |       Owner:  Needs Funding
     Type:  defect         |      Status:  assigned
 Priority:  normal         |   Milestone:  7.1
Component:  unspecified    |     Version:  6
 Severity:  normal         |  Resolution:
 Keywords:  qualification  |  Blocked By:
 Blocking:                 |
---------------------------+----------------------------

Comment (by Daniel Páscoa):

 All the relevant information that was present in the ticket is now
 presented below.

 ||= **Files related with ISVV Finding** =||||=**Source Code
 Function**=||||=**Lines**=||||=**Discrepancy**=||||=**Recommendation**=||
 ||bsps\sparc\leon3\clock\ckinit.c||||-||||55||||The variable "clkirq" is
 declared as int, although it is given as input to functions that require
 an unsigned int 32;||||Consider changing the return data type to the
 correct one.||
 ||bsps\sparc\leon3\include\bsp.h||||BSP_shared_interrupt_register||||153||||"irq"
 input parameter with wrong data type. The function called inside the
 function receives the variable "irq" as int but expects a
 "rtems_vector_number" which is a uint_32 data type.||||Consider changing
 the return data type to the correct one.||
 ||bsps\sparc\leon3\include\bsp.h||||BSP_shared_interrupt_unregister||||172||||"irq"
 input parameter with wrong data type. The function called inside the
 function receives the variable "irq" as int but expects a
 "rtems_vector_number" which is a uint_32 data type.||||Consider changing
 the return data type to the correct one.||
 ||bsps\sparc\leon3\include\bsp.h||||BSP_shared_interrupt_register||||151||||Function
 return wrong data type. Function is declared to return an int value but
 instead returns a "rtems_status_code" which is an unsigned int
 32.||||Consider changing the return data type to the correct one.||
 ||bsps\sparc\leon3\include\bsp.h||||BSP_shared_interrupt_unregister||||170||||Function
 return wrong data type. Function is declared to return an int value but
 instead returns a "rtems_status_code" which is an unsigned int
 32.||||Consider changing the return data type to the correct one.||
 ||cpukit\libtest\t-test-interrupt.c||||-||||282||||Parameter 'executing'
 can be declared with const.||||Consider changing the return data type to
 the correct one.||
 ||bsps\shared\irq\irq-generic.c||||-||||137||||Parameter 'arg' can be
 declared with const.||||Consider changing the return data type to the
 correct one.||
 ||cpukit\score\src\stackallocatorforidle.c||||_Stack_Allocator_allocate_for_idle_default||||60||||Void
 function returning.||||Consider changing the return data type to the
 correct one.||
 ||cpukit\score\src\threadstackallocate.c||||_Stack_Allocate||||26||||Void
 function returning.||||Consider changing the return data type to the
 correct one.||

 Note: The versions and line numbers here referred to are relative to ESA
 RTEMS SMP Qualification Data Pack release 3. This was built using the
 src/rtems repository, based on commit
 d7205f0083f8fdd0408404ce99c6eab9b8d120c7 of the master branch of the
 origin.

--
Ticket URL: <http://devel.rtems.org/ticket/4816#comment:4>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list