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

Fix string records for data products #2697

Merged
merged 132 commits into from
Apr 25, 2024

Conversation

bocchino
Copy link
Collaborator

@bocchino bocchino commented Apr 18, 2024

This PR is a companion to nasa/fpp#408. It incorporates the fix for nasa/fpp#392.

Note: Review and merge #2679 first.

bocchino and others added 30 commits December 7, 2022 13:35
TimeBaseStoreType is not the same as TimeBase
Cast to the TimeBaseStore type with a known size
Remove unnecessary const casting

const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
ParamString(const StringBase& src) : StringBase() { *this = src; }

Check warning

Code scanning / CppCheck

Single-parameter constructors should be marked explicit. Warning

Single-parameter constructors should be marked explicit.

private:
ParamString(const char* src) : StringBase() { *this = src; }

Check warning

Code scanning / CppCheck

Single-parameter constructors should be marked explicit. Warning

Single-parameter constructors should be marked explicit.

const char* toChar() const; //!< gets char buffer
NATIVE_UINT_TYPE getCapacity() const ; //!< return buffer size
String(const StringBase& src) : StringBase() { *this = src; }

Check warning

Code scanning / CppCheck

Single-parameter constructors should be marked explicit. Warning

Single-parameter constructors should be marked explicit.

private:
String(const char* src) : StringBase() { *this = src; }

Check warning

Code scanning / CppCheck

Single-parameter constructors should be marked explicit. Warning

Single-parameter constructors should be marked explicit.
@bocchino bocchino marked this pull request as ready for review April 23, 2024 16:34
@bocchino bocchino requested a review from LeStarch April 23, 2024 16:59
requirements.txt Show resolved Hide resolved
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.

@bocchino bocchino requested a review from thomas-bc April 23, 2024 18:05
return static_cast<SizeType>(sizeof(FwSizeStoreType)) + this->length();
}

StringBase::SizeType StringBase::serializedTruncatedSize(FwSizeType maxLength) const {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

serializedTruncatedSize uses the basic integral type unsigned int rather than a typedef with size and signedness.
return static_cast<SizeType>(sizeof(FwSizeStoreType)) + this->length();
}

StringBase::SizeType StringBase::serializedTruncatedSize(FwSizeType maxLength) const {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

maxLength uses the basic integral type unsigned long rather than a typedef with size and signedness.
@@ -117,6 +117,14 @@
return static_cast<SizeType>(StringUtils::string_length(this->toChar(), this->getCapacity()));
}

StringBase::SizeType StringBase::serializedSize() const {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

serializedSize uses the basic integral type unsigned int rather than a typedef with size and signedness.
@LeStarch LeStarch merged commit f265eb2 into nasa:devel Apr 25, 2024
48 checks passed
@bocchino bocchino deleted the fpp-issue-392-string-records branch April 25, 2024 23:48
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