summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-10-19 14:44:43 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-10-19 14:46:33 +0200
commit0a518ad7d0aa94df529af2c39c2b34457b6d1015 (patch)
tree0f846576925b5677e51ea6a7aa99c8824eb86dfd /compat
parentef5b07efe3517713e0343e01c806149a0a20b873 (diff)
compat, tracker/pt: add warn_unused_result compat macro
Diffstat (limited to 'compat')
-rw-r--r--compat/util.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/compat/util.hpp b/compat/util.hpp
index abcc9ba2..3a28ce90 100644
--- a/compat/util.hpp
+++ b/compat/util.hpp
@@ -112,3 +112,9 @@ auto run_in_thread_sync(QObject* obj, F&& fun)
cvar.wait(guard);
return traits::pass(std::move(ret));
}
+
+#if defined(_MSC_VER) && !defined(Q_CREATOR_RUN)
+# define DEFUN_WARN_UNUSED _Check_return_
+#else
+# define DEFUN_WARN_UNUSED __attribute__((warn_unused_result))
+#endif