Skip to content

Purge PlatformIntType and PlatformUIntType#3719

Merged
LeStarch merged 6 commits intonasa:develfrom
LeStarch:NATIVE-be-gone
Jun 17, 2025
Merged

Purge PlatformIntType and PlatformUIntType#3719
LeStarch merged 6 commits intonasa:develfrom
LeStarch:NATIVE-be-gone

Conversation

@LeStarch
Copy link
Collaborator

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

Change Description

Removing deprecated PlatformIntType and PlatformUIntType.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

}

SocketIpStatus IpSocket::setupTimeouts(PlatformIntType socketFd) {
SocketIpStatus IpSocket::setupTimeouts(int socketFd) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.


SocketIpStatus UdpSocket::bind(const PlatformIntType fd) {
SocketIpStatus UdpSocket::bind(const int fd) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
#endif

void ActiveComponentBase::start(FwTaskPriorityType priority, Os::Task::ParamType stackSize, Os::Task::ParamType cpuAffinity, Os::Task::ParamType identifier) {
void ActiveComponentBase::start(FwTaskPriorityType priority, FwSizeType stackSize, FwSizeType cpuAffinity, FwTaskIdType identifier) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.

PlatformIntType set_stack_size(pthread_attr_t& attributes, const Os::Task::Arguments& arguments) {
PlatformIntType status = PosixTaskHandle::SUCCESS;
int set_stack_size(pthread_attr_t& attributes, const Os::Task::Arguments& arguments) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
}

PlatformIntType set_priority_params(pthread_attr_t& attributes, const Os::Task::Arguments& arguments) {
int set_priority_params(pthread_attr_t& attributes, const Os::Task::Arguments& arguments) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
}

Directory::Status errno_to_directory_status(PlatformIntType errno_input) {
Directory::Status errno_to_directory_status(int errno_input) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
}

RawTime::Status errno_to_rawtime_status(PlatformIntType errno_input) {
RawTime::Status errno_to_rawtime_status(int errno_input) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
}

Task::Status posix_status_to_task_status(PlatformIntType posix_status) {
Task::Status posix_status_to_task_status(int posix_status) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
}

Mutex::Status posix_status_to_mutex_status(PlatformIntType posix_status){
Mutex::Status posix_status_to_mutex_status(int posix_status){

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
}

ConditionVariable::Status posix_status_to_conditional_status(PlatformIntType posix_status) {
ConditionVariable::Status posix_status_to_conditional_status(int posix_status) {

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
void IpSocket::shutdown(const SocketDescriptor& socketDescriptor) {
errno = 0;
PlatformIntType status = ::shutdown(socketDescriptor.fd, SHUT_RDWR);
int status = ::shutdown(socketDescriptor.fd, SHUT_RDWR);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter socketDescriptor has not been checked.
PlatformIntType clientFd = -1;
PlatformIntType serverFd = socketDescriptor.serverFd;
int clientFd = -1;
int serverFd = socketDescriptor.serverFd;

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter socketDescriptor has not been checked.
// Standard multithreading tasks use the task loop to respectively call the state machine
Os::Task::taskRoutine routine = (m_task.isCooperative()) ? this->s_taskStateMachine : this->s_taskLoop;
Os::Task::Arguments arguments(taskName, routine, this, priority, stackSize, cpuAffinity, static_cast<PlatformUIntType>(identifier));
Os::Task::Arguments arguments(taskName, routine, this, priority, stackSize, cpuAffinity, identifier);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter priority has not been checked.
// Standard multithreading tasks use the task loop to respectively call the state machine
Os::Task::taskRoutine routine = (m_task.isCooperative()) ? this->s_taskStateMachine : this->s_taskLoop;
Os::Task::Arguments arguments(taskName, routine, this, priority, stackSize, cpuAffinity, static_cast<PlatformUIntType>(identifier));
Os::Task::Arguments arguments(taskName, routine, this, priority, stackSize, cpuAffinity, identifier);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter stackSize has not been checked.
// Standard multithreading tasks use the task loop to respectively call the state machine
Os::Task::taskRoutine routine = (m_task.isCooperative()) ? this->s_taskStateMachine : this->s_taskLoop;
Os::Task::Arguments arguments(taskName, routine, this, priority, stackSize, cpuAffinity, static_cast<PlatformUIntType>(identifier));
Os::Task::Arguments arguments(taskName, routine, this, priority, stackSize, cpuAffinity, identifier);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter cpuAffinity has not been checked.
// Standard multithreading tasks use the task loop to respectively call the state machine
Os::Task::taskRoutine routine = (m_task.isCooperative()) ? this->s_taskStateMachine : this->s_taskLoop;
Os::Task::Arguments arguments(taskName, routine, this, priority, stackSize, cpuAffinity, static_cast<PlatformUIntType>(identifier));
Os::Task::Arguments arguments(taskName, routine, this, priority, stackSize, cpuAffinity, identifier);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter identifier has not been checked.
formatStatus = Fw::FormatStatus::SIZE_OVERFLOW;
} else {
PlatformIntType needed_size = vsnprintf(destination, static_cast<size_t>(maximumSize), formatString, args);
int needed_size = vsnprintf(destination, static_cast<size_t>(maximumSize), formatString, args);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter args has not been checked.
break;
}
PlatformIntType descriptor = ::open(filepath, mode_flags, USER_FLAGS);
int descriptor = ::open(filepath, mode_flags, USER_FLAGS);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter filepath has not been checked.

while (true) {
PlatformIntType status = nanosleep(&sleep_interval, &remaining_interval);
int status = nanosleep(&sleep_interval, &remaining_interval);

Check warning

Code scanning / CodeQL

Use of delay function Warning

Task synchronization shall not be performed through task delays.
stackSize,
cpuAffinity,
static_cast<PlatformUIntType>(identifier)));
static_cast<FwTaskIdType>(identifier)));

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter identifier has not been checked.
@LeStarch LeStarch requested a review from thomas-bc June 16, 2025 22:59
@LeStarch LeStarch changed the title Purging PlatformIntType and PlatformUIntType Purge PlatformIntType and PlatformUIntType Jun 16, 2025
@LeStarch LeStarch merged commit 292476b into nasa:devel Jun 17, 2025
52 of 53 checks passed
@thomas-bc thomas-bc deleted the NATIVE-be-gone branch June 17, 2025 00:47
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.

2 participants