[Scummvm-git-logs] scummvm master -> a0d7a99439a9d4d070c5847b489222913ec2c5ce

bonki bonki at users.noreply.github.com
Wed Apr 4 22:56:45 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a0d7a99439 COMMON: Add WARN_UNUSED_RESULT to scummsys.h


Commit: a0d7a99439a9d4d070c5847b489222913ec2c5ce
    https://github.com/scummvm/scummvm/commit/a0d7a99439a9d4d070c5847b489222913ec2c5ce
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-04-04T20:56:41Z

Commit Message:
COMMON: Add WARN_UNUSED_RESULT to scummsys.h

Changed paths:
    common/scummsys.h


diff --git a/common/scummsys.h b/common/scummsys.h
index 5486ba2..ce54f3b 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -398,6 +398,18 @@
 	#endif
 #endif
 
+#ifndef WARN_UNUSED_RESULT
+	#if __cplusplus >= 201703L
+		#define WARN_UNUSED_RESULT [[nodiscard]]
+	#elif GCC_ATLEAST(3, 4)
+		#define WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
+	#elif defined(_Check_return_)
+		#define WARN_UNUSED_RESULT _Check_return_
+	#else
+		#define WARN_UNUSED_RESULT
+	#endif
+#endif
+
 #ifndef STRINGBUFLEN
 	#if defined(__N64__) || defined(__DS__) || defined(__3DS__)
 		#define STRINGBUFLEN 256





More information about the Scummvm-git-logs mailing list