1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Merge pull request #656 from VILLASframework/fix-release

fix warnings in release builds
This commit is contained in:
Steffen Vogel 2023-06-15 11:42:04 +02:00 committed by GitHub
commit 9916a6b3d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View file

@ -71,7 +71,8 @@ public:
char *buf;
asprintf(&buf, "Lua: %s: %s", msg, lua_tostring(L, -1));
if (asprintf(&buf, "Lua: %s: %s", msg, lua_tostring(L, -1)) < 0)
return "Lua: could not format error message";
return buf;
}

View file

@ -333,7 +333,7 @@ bool ASDUData::addSampleToASDU(CS101_ASDU &asdu, ASDUData::Sample sample) const
}
default:
assert(!"unreachable");
throw RuntimeError { "invalid asdu data type" };
}
bool successfully_added = CS101_ASDU_addInformationObject(asdu, io);

View file

@ -110,7 +110,7 @@ MmsValue * GooseSignal::toMmsValue() const
case MmsType::MMS_FLOAT:
return newMmsFloat(signal_data.f, meta.size);
default:
assert(!"unreachable");
throw RuntimeError { "invalid mms type" };
}
}
@ -141,7 +141,7 @@ MmsValue * GooseSignal::newMmsInteger(int64_t i, int size)
MmsValue_setInt64(mms_integer, static_cast<int64_t>(i));
return mms_integer;
default:
assert(!"unreachable");
throw RuntimeError { "invalid mms integer size" };
}
}
@ -160,7 +160,7 @@ MmsValue * GooseSignal::newMmsUnsigned(uint64_t u, int size)
MmsValue_setUint32(mms_unsigned, static_cast<uint32_t>(u));
return mms_unsigned;
default:
assert(!"unreachable");
throw RuntimeError { "invalid mms integer size" };
}
}
@ -172,7 +172,7 @@ MmsValue * GooseSignal::newMmsFloat(double d, int size)
case 64:
return MmsValue_newDouble(d);
default:
assert(!"unreachable");
throw RuntimeError { "invalid mms float size" };
}
}

View file

@ -241,6 +241,7 @@ void redis_on_message(NodeCompat *n, const std::string &channel, const std::stri
break;
default:
pushed = 0;
goto out;
}