Another C2220: warning treated as error with MSVC 2015
jan iversen
jani at documentfoundation.org
Mon Jul 25 05:28:55 UTC 2016
Hi
We prefer patches to be submitted through gerrit, as it gives us a possibility to review them.
Have a look at:
https://wiki.documentfoundation.org/Development/GetInvolved#Prepare_to_submit_patches
Apart from that, your patch changes the way the program works, by removing the try/catch clause, you pass exceptions to higher levels (callers of the function), and that is surely not a good idea.
rgds
jan I.
> On 24 Jul 2016, at 20:04, slacka <lukebenes at hotmail.com> wrote:
>
> Can we trust MSVC 2015 unreachable code analysis like we with this similar
> issue?
> <http://nabble.documentfoundation.org/New-C2220-warning-treated-as-error-MSVC-2015-build-failure-tc4187644.html#a4189119>
>
> The patch below fixes the build:
>
> diff --git a/comphelper/source/misc/threadpool.cxx
> b/comphelper/source/misc/threadpool.cxx
> index 6846f4b..6a335e0 100644
> --- a/comphelper/source/misc/threadpool.cxx
> +++ b/comphelper/source/misc/threadpool.cxx
> @@ -72,17 +72,7 @@ public:
> {
> SAL_WARN("comphelper", "exception in thread worker while
> calling doWork(): " << e.Message);
> }
> - try {
> - delete pTask;
> - }
> - catch (const std::exception &e)
> - {
> - SAL_WARN("comphelper", "exception in thread worker while
> deleting task: " << e.what());
> - }
> - catch (const css::uno::Exception &e)
> - {
> - SAL_WARN("comphelper", "exception in thread worker while
> deleting task: " << e.Message);
> - }
> + delete pTask;
> pTag->onTaskWorkerDone();
> }
> }
>
>
>
>
>
>
> --
> View this message in context: http://nabble.documentfoundation.org/C2220-warning-treated-as-error-64-bit-MSVC-2015-tp4184053p4189213.html
> Sent from the Dev mailing list archive at Nabble.com.
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20160725/818345cf/attachment.html>
More information about the LibreOffice
mailing list