The context makes it clear enough whether the report was produced on
Windows or in Wine. So use a shorter, more readable name.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/lib/WineTestBot/LogUtils.pm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 59b2d0a0fa..f142982df4 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/…
[View More]LogUtils.pm
@@ -596,11 +596,11 @@ sub GetLogFileNames($;$)
}
my %_LogFileLabels = (
- "exe32.report" => "32 bit Windows report",
- "exe64.report" => "64 bit Windows report",
- "win32.report" => "32 bit Wine report",
- "wow32.report" => "32 bit WoW Wine report",
- "wow64.report" => "64 bit Wow Wine report",
+ "exe32.report" => "32 bit report",
+ "exe64.report" => "64 bit report",
+ "win32.report" => "32 bit report",
+ "wow32.report" => "32 bit WoW report",
+ "wow64.report" => "64 bit WoW report",
"log" => "task log",
"old_log" => "old logs",
);
--
2.19.1
[View Less]
From: Michał Janiszewski <janisozaur(a)gmail.com>
Inspired by kernel check and recent unification of ARRAY_SIZE, provide
a way of enforcing the macro can only be applied to actual arrays and
not to pointers.
v2: Fix parentheses
Signed-off-by: Michał Janiszewski <janisozaur(a)gmail.com>
---
include/winnt.h | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/include/winnt.h b/include/winnt.h
index 7f822c4aec..b99a375ab0 100644
--- a/include/…
[View More]winnt.h
+++ b/include/winnt.h
@@ -760,7 +760,26 @@ typedef struct _MEMORY_BASIC_INFORMATION
((type *)((PCHAR)(address) - offsetof(type, field)))
#ifdef __WINESRC__
-# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+// Validate types used in the expression.
+// Based on https://elixir.bootlin.com/linux/v4.17.4/source/include/linux/kernel.h#L71
+
+#ifdef __GNUC__
+/**
+ * Force a compilation error if condition is true, but also produce a
+ * result (of value 0 and type size_t), so the expression can be used
+ * e.g. in a structure initializer (or where-ever else comma expressions
+ * aren't permitted).
+ */
+#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
+
+/* &a[0] degrades to a pointer: a different type from an array */
+#define __must_be_array(a) \
+ BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
+#else
+#define __must_be_array(a) 0
+#endif
+
+# define ARRAY_SIZE(x) ((sizeof(x) / sizeof((x)[0])) + __must_be_array(x))
#endif
/* Types */
--
2.18.0
[View Less]