#define pg_attribute_no_sanitize_alignment()
#endif
+/*
+ * pg_attribute_nonnull means the compiler should warn if the function is
+ * called with the listed arguments set to NULL. If no arguments are
+ * listed, the compiler should warn if any pointer arguments are set to NULL.
+ */
+#if __has_attribute (nonnull)
+#define pg_attribute_nonnull(...) __attribute__((nonnull(__VA_ARGS__)))
+#else
+#define pg_attribute_nonnull(...)
+#endif
+
/*
* Append PG_USED_FOR_ASSERTS_ONLY to definitions of variables that are only
* used in assert-enabled builds, to avoid compiler warnings about unused
int flags,
GucBoolCheckHook check_hook,
GucBoolAssignHook assign_hook,
- GucShowHook show_hook);
+ GucShowHook show_hook) pg_attribute_nonnull(1, 4);
extern void DefineCustomIntVariable(const char *name,
const char *short_desc,
int flags,
GucIntCheckHook check_hook,
GucIntAssignHook assign_hook,
- GucShowHook show_hook);
+ GucShowHook show_hook) pg_attribute_nonnull(1, 4);
extern void DefineCustomRealVariable(const char *name,
const char *short_desc,
int flags,
GucRealCheckHook check_hook,
GucRealAssignHook assign_hook,
- GucShowHook show_hook);
+ GucShowHook show_hook) pg_attribute_nonnull(1, 4);
extern void DefineCustomStringVariable(const char *name,
const char *short_desc,
int flags,
GucStringCheckHook check_hook,
GucStringAssignHook assign_hook,
- GucShowHook show_hook);
+ GucShowHook show_hook) pg_attribute_nonnull(1, 4);
extern void DefineCustomEnumVariable(const char *name,
const char *short_desc,
int flags,
GucEnumCheckHook check_hook,
GucEnumAssignHook assign_hook,
- GucShowHook show_hook);
+ GucShowHook show_hook) pg_attribute_nonnull(1, 4);
extern void MarkGUCPrefixReserved(const char *className);