Skip to content

Commit

Permalink
cast string_copy return value to void
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-bc committed Mar 1, 2024
1 parent 75f3c04 commit ce61d97
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Fw/Types/ObjectName.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
namespace Fw {

ObjectName::ObjectName(const CHAR* src) : StringBase() {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

src uses the basic integral type char rather than a typedef with size and signedness.
Fw::StringUtils::string_copy(this->m_buf, src, sizeof(this->m_buf));
(void) Fw::StringUtils::string_copy(this->m_buf, src, sizeof(this->m_buf));

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter src has not been checked.
}

ObjectName::ObjectName(const StringBase& src) : StringBase() {
Fw::StringUtils::string_copy(this->m_buf, src.toChar(), sizeof(this->m_buf));
(void) Fw::StringUtils::string_copy(this->m_buf, src.toChar(), sizeof(this->m_buf));

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter src has not been checked.
}

ObjectName::ObjectName(const ObjectName& src) : StringBase() {
Fw::StringUtils::string_copy(this->m_buf, src.toChar(), sizeof(this->m_buf));
(void) Fw::StringUtils::string_copy(this->m_buf, src.toChar(), sizeof(this->m_buf));

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter src has not been checked.
}

ObjectName::ObjectName() : StringBase() {
Expand All @@ -24,7 +24,7 @@ namespace Fw {
return *this;
}

Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf));
(void) Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf));
return *this;
}

Expand All @@ -33,12 +33,12 @@ namespace Fw {
return *this;
}

Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf));
(void) Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf));
return *this;
}

ObjectName& ObjectName::operator=(const CHAR* other) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

other uses the basic integral type char rather than a typedef with size and signedness.
Fw::StringUtils::string_copy(this->m_buf, other, sizeof(this->m_buf));
(void) Fw::StringUtils::string_copy(this->m_buf, other, sizeof(this->m_buf));

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter other has not been checked.
return *this;
}

Expand Down

0 comments on commit ce61d97

Please sign in to comment.