瀏覽代碼

define __nonnull

tags/v0.9.3
Holger Lubitz 17 年之前
父節點
當前提交
e3d10ac673
共有 1 個檔案被更改,包括 7 行新增0 行删除
  1. 7
    0
      src/include/compiler.h

+ 7
- 0
src/include/compiler.h 查看文件

@@ -291,6 +291,13 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
291 291
  */
292 292
 #define __const __attribute__ (( const ))
293 293
 
294
+/**
295
+ * Declare a function's pointer parameters as non-null - i.e. force
296
+ * compiler to check pointers at compile time and enable possible
297
+ * optimizations based on that fact
298
+ */
299
+#define __nonnull __attribute__ (( nonnull ))
300
+
294 301
 /**
295 302
  * Declare a function as used.
296 303
  *

Loading…
取消
儲存