#include <string.h>
#include <unistd.h>
+/*
+ * GCC complains that we check for null if we have a nonnull attribute, even
+ * though older or other compilers might just ignore that attribute if they
+ * don't support it. Ugh.
+ */
+#if defined(__GNUC__) && __GNUC__ >= 6
+#pragma GCC diagnostic ignored "-Wnonnull-compare"
+#endif
typedef struct {
int error;
extern int efidp_append_node(const_efidp dp, const_efidp dn, efidp *out);
extern int efidp_append_instance(const_efidp dp, const_efidp dpi, efidp *out);
+/*
+ * GCC complains that we check for null if we have a nonnull attribute, even
+ * though older or other compilers might just ignore that attribute if they
+ * don't support it. Ugh.
+ */
+#if defined(__GNUC__) && __GNUC__ >= 6
+#pragma GCC diagnostic ignored "-Wnonnull-compare"
+#endif
+
static inline int16_t
__attribute__((__artificial__))
__attribute__((__nonnull__(1)))
return 1;
}
+#if defined(__GNUC__) && __GNUC__ >= 6
+#pragma GCC diagnostic pop
+#endif
+
/* and now, printing and parsing */
extern ssize_t efidp_parse_device_node(char *path, efidp out, size_t size);
extern ssize_t efidp_parse_device_path(char *path, efidp out, size_t size);