Cast string_copy return value to void (#2556)

This commit is contained in:
Thomas Boyer-Chammard 2024-03-04 22:30:26 -05:00 committed by GitHub
parent c830a41c85
commit c1d51d3f69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 77 additions and 77 deletions

View File

@ -30,7 +30,7 @@ int main(int argc, char* argv[]) {
addr = strtoul(optarg,0,0); addr = strtoul(optarg,0,0);
break; break;
case 'd': case 'd':
Fw::StringUtils::string_copy(device, optarg, sizeof(device)); (void) Fw::StringUtils::string_copy(device, optarg, sizeof(device));
break; break;
default: default:
printf("test_ut %s\n",argv[0],help); printf("test_ut %s\n",argv[0],help);

View File

@ -4,15 +4,15 @@
namespace Fw { namespace Fw {
CmdStringArg::CmdStringArg(const char* src) : StringBase() { CmdStringArg::CmdStringArg(const char* src) : StringBase() {
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));
} }
CmdStringArg::CmdStringArg(const StringBase& src) : StringBase() { CmdStringArg::CmdStringArg(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));
} }
CmdStringArg::CmdStringArg(const CmdStringArg& src) : StringBase() { CmdStringArg::CmdStringArg(const CmdStringArg& 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));
} }
CmdStringArg::CmdStringArg() : StringBase() { CmdStringArg::CmdStringArg() : StringBase() {
@ -24,7 +24,7 @@ namespace Fw {
return *this; 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; return *this;
} }
@ -33,12 +33,12 @@ namespace Fw {
return *this; 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; return *this;
} }
CmdStringArg& CmdStringArg::operator=(const char* other) { CmdStringArg& CmdStringArg::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -4,15 +4,15 @@
namespace Fw { namespace Fw {
LogStringArg::LogStringArg(const char* src) : StringBase() { LogStringArg::LogStringArg(const char* src) : StringBase() {
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));
} }
LogStringArg::LogStringArg(const StringBase& src) : StringBase() { LogStringArg::LogStringArg(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));
} }
LogStringArg::LogStringArg(const LogStringArg& src) : StringBase() { LogStringArg::LogStringArg(const LogStringArg& 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));
} }
LogStringArg::LogStringArg() LogStringArg::LogStringArg()
@ -25,7 +25,7 @@ namespace Fw {
return *this; 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; return *this;
} }
@ -34,12 +34,12 @@ namespace Fw {
return *this; 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; return *this;
} }
LogStringArg& LogStringArg::operator=(const char* other) { LogStringArg& LogStringArg::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -3,15 +3,15 @@
namespace Fw { namespace Fw {
TextLogString::TextLogString(const char* src) : StringBase() { TextLogString::TextLogString(const char* src) : StringBase() {
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));
} }
TextLogString::TextLogString(const StringBase& src): StringBase() { TextLogString::TextLogString(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));
} }
TextLogString::TextLogString(const TextLogString& src): StringBase() { TextLogString::TextLogString(const TextLogString& 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));
} }
TextLogString::TextLogString(): StringBase() { TextLogString::TextLogString(): StringBase() {
@ -23,7 +23,7 @@ namespace Fw {
return *this; 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; return *this;
} }
@ -32,12 +32,12 @@ namespace Fw {
return *this; 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; return *this;
} }
TextLogString& TextLogString::operator=(const char* other) { TextLogString& TextLogString::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -4,15 +4,15 @@
namespace Fw { namespace Fw {
ParamString::ParamString(const char* src) : StringBase() { ParamString::ParamString(const char* src) : StringBase() {
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));
} }
ParamString::ParamString(const StringBase& src) : StringBase() { ParamString::ParamString(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));
} }
ParamString::ParamString(const ParamString& src) : StringBase() { ParamString::ParamString(const ParamString& 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));
} }
ParamString::ParamString() : StringBase() { ParamString::ParamString() : StringBase() {
@ -24,7 +24,7 @@ namespace Fw {
return *this; 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; return *this;
} }
@ -33,12 +33,12 @@ namespace Fw {
return *this; 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; return *this;
} }
ParamString& ParamString::operator=(const char* other) { ParamString& ParamString::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -4,15 +4,15 @@
namespace Test { namespace Test {
String::String(const char* src) : StringBase() { String::String(const char* src) : StringBase() {
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));
} }
String::String(const StringBase& src) : StringBase() { String::String(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));
} }
String::String(const String& src) : StringBase() { String::String(const String& 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));
} }
String::String() : StringBase() { String::String() : StringBase() {
@ -24,7 +24,7 @@ namespace Test {
return *this; 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; return *this;
} }
@ -33,12 +33,12 @@ namespace Test {
return *this; 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; return *this;
} }
String& String::operator=(const char* other) { String& String::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -4,15 +4,15 @@
namespace Fw { namespace Fw {
TlmString::TlmString(const char* src) : StringBase() { TlmString::TlmString(const char* src) : StringBase() {
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));
} }
TlmString::TlmString(const StringBase& src) : StringBase() { TlmString::TlmString(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));
} }
TlmString::TlmString(const TlmString& src) : StringBase() { TlmString::TlmString(const TlmString& 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));
} }
TlmString::TlmString() : StringBase() { TlmString::TlmString() : StringBase() {
@ -24,7 +24,7 @@ namespace Fw {
return *this; 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; return *this;
} }
@ -33,12 +33,12 @@ namespace Fw {
return *this; 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; return *this;
} }
TlmString& TlmString::operator=(const char* other) { TlmString& TlmString::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -4,15 +4,15 @@
namespace Fw { namespace Fw {
EightyCharString::EightyCharString(const char* src) : StringBase() { EightyCharString::EightyCharString(const char* src) : StringBase() {
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));
} }
EightyCharString::EightyCharString(const StringBase& src) : StringBase() { EightyCharString::EightyCharString(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));
} }
EightyCharString::EightyCharString(const EightyCharString& src) : StringBase() { EightyCharString::EightyCharString(const EightyCharString& 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));
} }
EightyCharString::EightyCharString() : StringBase() { EightyCharString::EightyCharString() : StringBase() {
@ -24,7 +24,7 @@ namespace Fw {
return *this; 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; return *this;
} }
@ -33,12 +33,12 @@ namespace Fw {
return *this; 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; return *this;
} }
EightyCharString& EightyCharString::operator=(const char* other) { EightyCharString& EightyCharString::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -4,15 +4,15 @@
namespace Fw { namespace Fw {
InternalInterfaceString::InternalInterfaceString(const char* src) : StringBase() { InternalInterfaceString::InternalInterfaceString(const char* src) : StringBase() {
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));
} }
InternalInterfaceString::InternalInterfaceString(const StringBase& src) : StringBase() { InternalInterfaceString::InternalInterfaceString(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));
} }
InternalInterfaceString::InternalInterfaceString(const InternalInterfaceString& src) : StringBase() { InternalInterfaceString::InternalInterfaceString(const InternalInterfaceString& 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));
} }
InternalInterfaceString::InternalInterfaceString() : StringBase() { InternalInterfaceString::InternalInterfaceString() : StringBase() {
@ -24,7 +24,7 @@ namespace Fw {
return *this; 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; return *this;
} }
@ -33,12 +33,12 @@ namespace Fw {
return *this; 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; return *this;
} }
InternalInterfaceString& InternalInterfaceString::operator=(const char* other) { InternalInterfaceString& InternalInterfaceString::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -4,15 +4,15 @@
namespace Fw { namespace Fw {
String::String(const char* src) : StringBase() { String::String(const char* src) : StringBase() {
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));
} }
String::String(const StringBase& src) : StringBase() { String::String(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));
} }
String::String(const String& src) : StringBase() { String::String(const String& 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));
} }
String::String() : StringBase() { String::String() : StringBase() {
@ -24,7 +24,7 @@ namespace Fw {
return *this; 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; return *this;
} }
@ -33,12 +33,12 @@ namespace Fw {
return *this; 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; return *this;
} }
String& String::operator=(const char* other) { String& String::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -96,14 +96,14 @@ namespace Fw {
return *this; return *this;
} }
Fw::StringUtils::string_copy(const_cast<char *>(this->toChar()), other.toChar(), this->getCapacity()); (void) Fw::StringUtils::string_copy(const_cast<char *>(this->toChar()), other.toChar(), this->getCapacity());
return *this; return *this;
} }
// Copy constructor doesn't make sense in this virtual class as there is nothing to copy. Derived classes should // Copy constructor doesn't make sense in this virtual class as there is nothing to copy. Derived classes should
// call the empty constructor and then call their own copy function // call the empty constructor and then call their own copy function
StringBase& StringBase::operator=(const CHAR* other) { // lgtm[cpp/rule-of-two] StringBase& StringBase::operator=(const CHAR* other) { // lgtm[cpp/rule-of-two]
Fw::StringUtils::string_copy(const_cast<char *>(this->toChar()), other, this->getCapacity()); (void) Fw::StringUtils::string_copy(const_cast<char *>(this->toChar()), other, this->getCapacity());
return *this; return *this;
} }

View File

@ -4,15 +4,15 @@
namespace Os { namespace Os {
QueueString::QueueString(const char* src) : StringBase() { QueueString::QueueString(const char* src) : StringBase() {
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));
} }
QueueString::QueueString(const StringBase& src) : StringBase() { QueueString::QueueString(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));
} }
QueueString::QueueString(const QueueString& src) : StringBase() { QueueString::QueueString(const QueueString& 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));
} }
QueueString::QueueString() : StringBase() { QueueString::QueueString() : StringBase() {
@ -24,7 +24,7 @@ namespace Os {
return *this; 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; return *this;
} }
@ -33,12 +33,12 @@ namespace Os {
return *this; 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; return *this;
} }
QueueString& QueueString::operator=(const char* other) { QueueString& QueueString::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -4,15 +4,15 @@
namespace Os { namespace Os {
TaskString::TaskString(const char* src) : StringBase() { TaskString::TaskString(const char* src) : StringBase() {
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));
} }
TaskString::TaskString(const StringBase& src) : StringBase() { TaskString::TaskString(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));
} }
TaskString::TaskString(const TaskString& src) : StringBase() { TaskString::TaskString(const TaskString& 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));
} }
TaskString::TaskString() { TaskString::TaskString() {
@ -24,7 +24,7 @@ namespace Os {
return *this; 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; return *this;
} }
@ -33,12 +33,12 @@ namespace Os {
return *this; 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; return *this;
} }
TaskString& TaskString::operator=(const char* other) { TaskString& TaskString::operator=(const char* other) {
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));
return *this; return *this;
} }

View File

@ -107,7 +107,7 @@ namespace Svc {
"EVENT: (%d) (%d:%d,%d) %s: %s", "EVENT: (%d) (%d:%d,%d) %s: %s",
id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severityString,text.toChar()); id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severityString,text.toChar());
ASSERT_EQ(0,strcmp(textStr,buf)); ASSERT_EQ(0,strcmp(textStr,buf));
Fw::StringUtils::string_copy(oldLine, buf, sizeof(oldLine)); (void) Fw::StringUtils::string_copy(oldLine, buf, sizeof(oldLine));
} }
} }
stream1.close(); stream1.close();
@ -210,7 +210,7 @@ namespace Svc {
"EVENT: (%d) (%d:%d,%d) %s: %s", "EVENT: (%d) (%d:%d,%d) %s: %s",
id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severityString,text.toChar()); id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severityString,text.toChar());
ASSERT_EQ(0,strcmp(textStr,buf)); ASSERT_EQ(0,strcmp(textStr,buf));
Fw::StringUtils::string_copy(oldLine, buf, sizeof(oldLine)); (void) Fw::StringUtils::string_copy(oldLine, buf, sizeof(oldLine));
} }
} }
stream1.close(); stream1.close();

View File

@ -167,8 +167,8 @@ namespace Svc {
FW_ASSERT(sourceFilename.length() < sizeof(entry.srcFilename)); FW_ASSERT(sourceFilename.length() < sizeof(entry.srcFilename));
FW_ASSERT(destFilename.length() < sizeof(entry.destFilename)); FW_ASSERT(destFilename.length() < sizeof(entry.destFilename));
Fw::StringUtils::string_copy(entry.srcFilename, sourceFilename.toChar(), sizeof(entry.srcFilename)); (void) Fw::StringUtils::string_copy(entry.srcFilename, sourceFilename.toChar(), sizeof(entry.srcFilename));
Fw::StringUtils::string_copy(entry.destFilename, destFilename.toChar(), sizeof(entry.destFilename)); (void) Fw::StringUtils::string_copy(entry.destFilename, destFilename.toChar(), sizeof(entry.destFilename));
Os::Queue::QueueStatus status = m_fileQueue.send(reinterpret_cast<U8*>(&entry), sizeof(entry), 0, Os::Queue::QUEUE_NONBLOCKING); Os::Queue::QueueStatus status = m_fileQueue.send(reinterpret_cast<U8*>(&entry), sizeof(entry), 0, Os::Queue::QUEUE_NONBLOCKING);
@ -240,8 +240,8 @@ namespace Svc {
FW_ASSERT(sourceFilename.length() < sizeof(entry.srcFilename)); FW_ASSERT(sourceFilename.length() < sizeof(entry.srcFilename));
FW_ASSERT(destFilename.length() < sizeof(entry.destFilename)); FW_ASSERT(destFilename.length() < sizeof(entry.destFilename));
Fw::StringUtils::string_copy(entry.srcFilename, sourceFilename.toChar(), sizeof(entry.srcFilename)); (void) Fw::StringUtils::string_copy(entry.srcFilename, sourceFilename.toChar(), sizeof(entry.srcFilename));
Fw::StringUtils::string_copy(entry.destFilename, destFilename.toChar(), sizeof(entry.destFilename)); (void) Fw::StringUtils::string_copy(entry.destFilename, destFilename.toChar(), sizeof(entry.destFilename));
Os::Queue::QueueStatus status = m_fileQueue.send(reinterpret_cast<U8*>(&entry), sizeof(entry), 0, Os::Queue::QUEUE_NONBLOCKING); Os::Queue::QueueStatus status = m_fileQueue.send(reinterpret_cast<U8*>(&entry), sizeof(entry), 0, Os::Queue::QUEUE_NONBLOCKING);
@ -273,8 +273,8 @@ namespace Svc {
FW_ASSERT(sourceFilename.length() < sizeof(entry.srcFilename)); FW_ASSERT(sourceFilename.length() < sizeof(entry.srcFilename));
FW_ASSERT(destFilename.length() < sizeof(entry.destFilename)); FW_ASSERT(destFilename.length() < sizeof(entry.destFilename));
Fw::StringUtils::string_copy(entry.srcFilename, sourceFilename.toChar(), sizeof(entry.srcFilename)); (void) Fw::StringUtils::string_copy(entry.srcFilename, sourceFilename.toChar(), sizeof(entry.srcFilename));
Fw::StringUtils::string_copy(entry.destFilename, destFilename.toChar(), sizeof(entry.destFilename)); (void) Fw::StringUtils::string_copy(entry.destFilename, destFilename.toChar(), sizeof(entry.destFilename));
Os::Queue::QueueStatus status = m_fileQueue.send(reinterpret_cast<U8*>(&entry), sizeof(entry), 0, Os::Queue::QUEUE_NONBLOCKING); Os::Queue::QueueStatus status = m_fileQueue.send(reinterpret_cast<U8*>(&entry), sizeof(entry), 0, Os::Queue::QUEUE_NONBLOCKING);