silence use-after-free warning in mdds for gcc12.3 in optimized build
Follow-up to e7c4166f1e
as GCC 12.3
seems to be affected, too.
Change-Id: I8e5ba9be64625ffd21d43e627996a9ea8602ce9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162181
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com>
This commit is contained in:
parent
fcff7f7261
commit
5d52d7dcdf
1 changed files with 2 additions and 2 deletions
|
@ -28,13 +28,13 @@ diff -ur mdds.org/include/mdds/node.hpp mdds/include/mdds/node.hpp
|
|||
{
|
||||
- --p->refcount;
|
||||
- if (!p->refcount)
|
||||
+#if defined __GNUC__ && __GNUC__ == 12 && __GNUC_MINOR__ < 3 && !defined __clang__
|
||||
+#if defined __GNUC__ && __GNUC__ == 12 && __GNUC_MINOR__ <= 3 && !defined __clang__
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wuse-after-free"
|
||||
+#endif
|
||||
+ if(--p->refcount == 0)
|
||||
delete p;
|
||||
+#if defined __GNUC__ && __GNUC__ == 12 && __GNUC_MINOR__ < 3 && !defined __clang__
|
||||
+#if defined __GNUC__ && __GNUC__ == 12 && __GNUC_MINOR__ <= 3 && !defined __clang__
|
||||
+#pragma GCC diagnostic pop
|
||||
+#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue