Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1708 by Completing the work In Fw #3173

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

LeStarch
Copy link
Collaborator

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

Change Description

This completes the work for #1708 by updating Fw.

}
}
return formatStatus;
}

Check warning

Code scanning / CppCheck

Could not find a newline character at the end of the file. Warning

Could not find a newline character at the end of the file.
if (status < 0) {
buffer[0] = 0;
}
#if FW_OBJECT_TO_STRING == 1

Check notice

Code scanning / CodeQL

Conditional compilation Note

Use of conditional compilation must be kept to a minimum.

namespace Fw {

PassiveComponentBase::PassiveComponentBase(const char* name) : Fw::ObjBase(name), m_idBase(0), m_instance(0) {
}

#if FW_OBJECT_TO_STRING == 1 && FW_OBJECT_NAMES == 1
#if FW_OBJECT_TO_STRING == 1

Check notice

Code scanning / CodeQL

Conditional compilation Note

Use of conditional compilation must be kept to a minimum.
if (status < 0) {
Fw::FormatStatus status = Fw::ExternalString(buffer, static_cast<Fw::ExternalString::SizeType>(size)).format(
this->getToStringFormatString(),
#if FW_OBJECT_NAMES == 1

Check notice

Code scanning / CodeQL

Conditional compilation Note

Use of conditional compilation must be kept to a minimum.
if (status < 0) {
buffer[0] = 0;
}
#if FW_OBJECT_TO_STRING == 1

Check notice

Code scanning / CodeQL

Conditional compilation Note

Use of conditional compilation must be kept to a minimum.
const char* formatString = this->getToStringFormatString();
// Determine this port object name (or use "UNKOWN")
const char* object_name =
#if FW_OBJECT_NAMES == 1

Check notice

Code scanning / CodeQL

Conditional compilation Note

Use of conditional compilation must be kept to a minimum.

// Get the name of the connectioned object, "UNKNNOWN" or "NONE"
const char* connected_to = this->isConnected() ?
#if FW_OBJECT_NAMES == 1

Check notice

Code scanning / CodeQL

Conditional compilation Note

Use of conditional compilation must be kept to a minimum.
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.

Copy link
Collaborator

@thomas-bc thomas-bc left a comment

Choose a reason for hiding this comment

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

Looks good to me! Just one comment. CI seems unhappy though

// \brief cpp file for c-string format function as a implementation using snprintf
//
// \copyright
// Copyright (C) 2025 California Institute of Technology.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe we are not supposed to add those copyright notices anymore?

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