From 4bf5bc1274d7da738f499505fa3d6cae6d01860a Mon Sep 17 00:00:00 2001 From: Phenom Date: Fri, 22 Feb 2019 23:16:45 +0100 Subject: [PATCH] Fix clang warnings for ../../../trunk/libretroshare/src/services/autoproxy/ rsautoproxymonitor.cc:263:24: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] ^ ../../../trunk/libretroshare/src/services/autoproxy/ rsautoproxymonitor.cc:295:24: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] ^ ./../../trunk/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp: 723: warning: pragma diagnostic pop could not pop, no matching push [- Wunknown-pragmas] ^ --- libretroshare/src/services/autoproxy/rsautoproxymonitor.cc | 2 ++ retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/libretroshare/src/services/autoproxy/rsautoproxymonitor.cc b/libretroshare/src/services/autoproxy/rsautoproxymonitor.cc index aef160590..d198bd207 100644 --- a/libretroshare/src/services/autoproxy/rsautoproxymonitor.cc +++ b/libretroshare/src/services/autoproxy/rsautoproxymonitor.cc @@ -258,6 +258,7 @@ void rsAutoProxyMonitor::taskDone(taskTicket *t, autoProxyStatus::autoProxyStatu if (cleanUp) { if (t->data) { std::cerr << "(WW) rsAutoProxyMonitor::taskFinish will try to delete void pointer!" << std::endl; +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdelete-incomplete" delete t->data; #pragma GCC diagnostic pop @@ -290,6 +291,7 @@ void rsAutoProxyMonitor::taskFinished(taskTicket *&ticket) // clean up if (ticket->data) { std::cerr << "rsAutoProxyMonitor::taskFinished data set. Will try to delete void pointer" << std::endl; +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdelete-incomplete" delete ticket->data; #pragma GCC diagnostic pop diff --git a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp index c9f912420..564cf9d66 100644 --- a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp @@ -717,6 +717,7 @@ private: // we pack the couple (id of DL, id of source) into a single 32-bits pointer that is required by the AbstractItemModel class. +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" uint32_t src = uint32_t( *reinterpret_cast(&ref) & TRANSFERS_NB_SOURCES_BIT_MASK_32BITS ) ; uint32_t ntr = ( *reinterpret_cast(&ref)) >> TRANSFERS_NB_SOURCES_BITS_32BITS ;