#4816 assigned defect

Wrong data type

Reported by: Daniel Páscoa Owned by: Needs Funding
Priority: normal Milestone: 7.1
Component: unspecified Version: 6
Severity: normal Keywords: qualification
Cc: Blocked By:
Blocking:

Description

Description:
There are several issues with the function declaration, input parameters, and return data types that should be corrected to match the expected types as per the RTEMS Software Engineering guidelines.

The attached excel lists in a systematic way the sources where this issue applies and has more information related with this issue.

Additional Notes:
This ticket was raised as an outcome of the Independent SW Verification and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs (https://rtems-qual.io.esa.int). Original ISVV reference for this issue is RTEMS-SMP-CODE-VER-030.

File list (please check the attached excel for more information):
bsps\sparc\leon3\clock\ckinit.c
bsps\sparc\leon3\include\bsp.h
cpukit\libtest\t-test-interrupt.c
bsps\shared\irq\irq-generic.c
cpukit\score\src\stackallocatorforidle.c
cpukit\score\src\threadstackallocate.c

Attachments (1)

RTEMS-SMP-CODE-VER-030.xlsx (10.2 KB) - added by Daniel Páscoa on 01/23/23 at 11:39:49.

Download all attachments as: .zip

Change History (5)

Changed on 01/23/23 at 11:39:49 by Daniel Páscoa

Attachment: RTEMS-SMP-CODE-VER-030.xlsx added

comment:1 Changed on 01/23/23 at 12:56:26 by Sebastian Huber

Adding the XLSX file is not really helpful. Please add all the relevant information to the ticket directly.

comment:2 Changed on 01/23/23 at 13:06:26 by Sebastian Huber

Keywords: qualification added

comment:3 Changed on 01/24/23 at 10:30:12 by Sebastian Huber

Component: adminunspecified
Milestone: 7.1
Owner: set to Needs Funding
Status: newassigned
Version: 6

comment:4 Changed on 06/01/23 at 15:46:14 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 FunctionLinesDiscrepancyRecommendation
bsps\sparc\leon3\clock\ckinit.c-55The 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.hBSP_shared_interrupt_register153"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.hBSP_shared_interrupt_unregister172"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.hBSP_shared_interrupt_register151Function 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.hBSP_shared_interrupt_unregister170Function 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-282Parameter 'executing' can be declared with const.Consider changing the return data type to the correct one.
bsps\shared\irq\irq-generic.c-137Parameter '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_default60Void function returning.Consider changing the return data type to the correct one.
cpukit\score\src\threadstackallocate.c_Stack_Allocate26Void 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.

Note: See TracTickets for help on using tickets.