Fix static analysis & cppcheck issues
This commit fixes:
1. warning: Value stored to 'event' is never read [deadcode.DeadStores]
2. style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
3. style: Variable 'usTimeOffset' is assigned a value that is never used. [unreadVariable]
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: Ia0c8235195aa7eceda8bd8f36cd11fcb72781d1b
diff --git a/inc/post_code.hpp b/inc/post_code.hpp
index 498a0d8..be800f2 100644
--- a/inc/post_code.hpp
+++ b/inc/post_code.hpp
@@ -72,7 +72,7 @@
{
void operator()(sd_event *event) const
{
- event = sd_event_unref(event);
+ sd_event_unref(event);
}
};
using EventPtr = std::unique_ptr<sd_event, EventDeleter>;