]> Git Repo - linux.git/blobdiff - include/linux/compiler.h
Merge tag 'sched-core-2024-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / include / linux / compiler.h
index 2df665fa2964d36b96cf4d11ca7029870c031ca2..ec55bcce4146fba53ed3e89d1aedd3211d7af45b 100644 (file)
@@ -242,6 +242,9 @@ static inline void *offset_to_ptr(const int *off)
 /* &a[0] degrades to a pointer: a different type from an array */
 #define __must_be_array(a)     BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
 
+/* Require C Strings (i.e. NUL-terminated) lack the "nonstring" attribute. */
+#define __must_be_cstr(p)      BUILD_BUG_ON_ZERO(__annotated(p, nonstring))
+
 /*
  * This returns a constant expression while determining if an argument is
  * a constant expression, most importantly without evaluating the argument.
This page took 0.035543 seconds and 4 git commands to generate.