From 828ae52362d1d12240fe4150d4ec70fd1652bfd4 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 4 Dec 2017 23:25:34 +0100 Subject: Avoid warning about deleting void* variable And replace free calls by delete because operator new was used. Change-Id: Ifb0d301b0a09dd83e3ad574c97e02bd8af072ae6 Signed-off-by: Romain Forlot --- signal-composer-binding/signal-composer.cpp | 2 +- signal-composer-binding/signal.cpp | 2 +- signal-composer-binding/source.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/signal-composer-binding/signal-composer.cpp b/signal-composer-binding/signal-composer.cpp index d9d004c..903af9c 100644 --- a/signal-composer-binding/signal-composer.cpp +++ b/signal-composer-binding/signal-composer.cpp @@ -575,7 +575,7 @@ void* Composer::createContext(void* ctx) void Composer::destroyContext(void* ctx) { - free(ctx); + delete(ctx); } std::vector Composer::parseURI(const std::string& uri) diff --git a/signal-composer-binding/signal.cpp b/signal-composer-binding/signal.cpp index 17286f5..ab8723e 100644 --- a/signal-composer-binding/signal.cpp +++ b/signal-composer-binding/signal.cpp @@ -72,7 +72,7 @@ Signal::Signal(const std::string& id, Signal::~Signal() { - free(onReceived_); + delete(onReceived_); } Signal::operator bool() const diff --git a/signal-composer-binding/source.cpp b/signal-composer-binding/source.cpp index 830f799..6ad9511 100644 --- a/signal-composer-binding/source.cpp +++ b/signal-composer-binding/source.cpp @@ -117,7 +117,7 @@ void SourceAPI::makeSubscription() ActionExecOne(&source, getSignals_, signalJ); // Considerate signal subscribed no matter what sig.second->subscribed_ = true; - delete(source.context); + delete((struct signalCBT*)source.context); } source.uid = ""; ActionExecOne(&source, getSignals_, nullptr); -- cgit 1.2.3-korg