Skip to content

Conversation

@LeStarch
Copy link
Collaborator

Related Issue(s)
Has Unit Tests (y/n)
Documentation Included (y/n)

Change Description

Fixes issues using configured fixed-size types!

const FwIndexType portNum = queueNum - ((queueType == QueueType::COM_QUEUE) ? 0 : COM_PORT_COUNT);
FW_ASSERT((queueType == QueueType::COM_QUEUE) || (queueNum >= COM_PORT_COUNT),
static_cast<FwAssertArgType>(queueType), static_cast<FwAssertArgType>(queueNum));
const FwIndexType portNum = static_cast<FwIndexType>(queueNum - ((queueType == QueueType::COM_QUEUE) ? 0 : COM_PORT_COUNT));

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter queueNum has not been checked.
QueueInterface::Status Queue::send(const U8* buffer,
FwSizeType size,
PlatformIntType priority,
FwQueuePriorityType priority,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

priority uses the basic integral type unsigned char rather than a typedef with size and signedness.
QueueInterface::BlockingType blockType,
FwSizeType& actualSize,
PlatformIntType& priority) {
FwQueuePriorityType& priority) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

priority uses the basic integral type unsigned char rather than a typedef with size and signedness.

QueueInterface::Status Queue::send(const Fw::SerializeBufferBase& message,
PlatformIntType priority,
FwQueuePriorityType priority,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

priority uses the basic integral type unsigned char rather than a typedef with size and signedness.
QueueInterface::Status Queue::receive(Fw::SerializeBufferBase& destination,
QueueInterface::BlockingType blockType,
PlatformIntType& priority) {
FwQueuePriorityType& priority) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

priority uses the basic integral type unsigned char rather than a typedef with size and signedness.
void ComQueue::buffQueueIn_handler(const FwIndexType portNum, Fw::Buffer& fwBuffer) {
const FwIndexType queueNum = portNum + COM_PORT_COUNT;
FW_ASSERT(std::numeric_limits<FwIndexType>::max() - COM_PORT_COUNT > portNum);
const FwIndexType queueNum = static_cast<FwIndexType>(portNum + COM_PORT_COUNT);

Check notice

Code scanning / CodeQL

Use of basic integral type Note

queueNum uses the basic integral type signed short rather than a typedef with size and signedness.
const FwIndexType portNum = queueNum - ((queueType == QueueType::COM_QUEUE) ? 0 : COM_PORT_COUNT);
FW_ASSERT((queueType == QueueType::COM_QUEUE) || (queueNum >= COM_PORT_COUNT),
static_cast<FwAssertArgType>(queueType), static_cast<FwAssertArgType>(queueNum));
const FwIndexType portNum = static_cast<FwIndexType>(queueNum - ((queueType == QueueType::COM_QUEUE) ? 0 : COM_PORT_COUNT));

Check notice

Code scanning / CodeQL

Use of basic integral type Note

portNum uses the basic integral type signed short rather than a typedef with size and signedness.
// this size.
static const FwSizeType DP_MAX_DIRECTORIES = 2;
static const FwSizeType DP_MAX_FILES = 1000;
static const FwIndexType DP_MAX_DIRECTORIES = 2;

Check notice

Code scanning / CodeQL

Use of basic integral type Note

DP_MAX_DIRECTORIES uses the basic integral type signed short rather than a typedef with size and signedness.
static const FwSizeType DP_MAX_DIRECTORIES = 2;
static const FwSizeType DP_MAX_FILES = 1000;
static const FwIndexType DP_MAX_DIRECTORIES = 2;
static const FwIndexType DP_MAX_FILES = 127;

Check notice

Code scanning / CodeQL

Use of basic integral type Note

DP_MAX_FILES uses the basic integral type signed short rather than a typedef with size and signedness.

// extract metadata for each file
for (FwNativeUIntType file = 0; file < filesRead; file++) {
for (FwSizeType file = 0; file < filesRead; file++) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

file uses the basic integral type unsigned long rather than a typedef with size and signedness.
Copy link
Collaborator

@kevin-f-ortega kevin-f-ortega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Only comment is to use PlatformTaskPriorityType in the OSAL::Task code. That is captured here #3410 and will be addressed in a future PR. This is good for now.

@LeStarch LeStarch merged commit 2dcd219 into nasa:devel Mar 28, 2025
41 checks passed
thomas-bc pushed a commit to thomas-bc/fprime that referenced this pull request Apr 8, 2025
* Testing with configured fixed-size types

* Linux fixes

* Final settings

* Removing FwNativeIntType
@LeStarch LeStarch deleted the issue-3208-fixed-ints branch August 19, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants