|
@@ -323,9 +323,18 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
|
|
|
#endif
|
|
|
#ifndef __compiletime_error
|
|
|
# define __compiletime_error(message)
|
|
|
-# define __compiletime_error_fallback(condition) \
|
|
|
+/*
|
|
|
+ * Sparse complains of variable sized arrays due to the temporary variable in
|
|
|
+ * __compiletime_assert. Unfortunately we can't just expand it out to make
|
|
|
+ * sparse see a constant array size without breaking compiletime_assert on old
|
|
|
+ * versions of GCC (e.g. 4.2.4), so hide the array from sparse altogether.
|
|
|
+ */
|
|
|
+# ifndef __CHECKER__
|
|
|
+# define __compiletime_error_fallback(condition) \
|
|
|
do { ((void)sizeof(char[1 - 2 * condition])); } while (0)
|
|
|
-#else
|
|
|
+# endif
|
|
|
+#endif
|
|
|
+#ifndef __compiletime_error_fallback
|
|
|
# define __compiletime_error_fallback(condition) do { } while (0)
|
|
|
#endif
|
|
|
|