From 0ebf6f6820c080d95392bd0c2a55a083e65d9ab3 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 27 Sep 2016 15:41:21 -0400 Subject: [PATCH] Don't use __pure__ on efidp_*() functions. The compiler keeps introducing off by one errors with -O2 but not with -Og and I'm not sure why, so just don't do this optimization. Signed-off-by: Peter Jones --- src/include/efivar/efivar-dp.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/include/efivar/efivar-dp.h b/src/include/efivar/efivar-dp.h index 230b8093..3b7e644c 100644 --- a/src/include/efivar/efivar-dp.h +++ b/src/include/efivar/efivar-dp.h @@ -708,7 +708,6 @@ extern int efidp_append_instance(const_efidp dp, const_efidp dpi, efidp *out); static inline int16_t __attribute__((__artificial__)) __attribute__((__nonnull__(1))) -__attribute__((__pure__)) __attribute__((__unused__)) efidp_type(const_efidp dp) { @@ -722,7 +721,6 @@ efidp_type(const_efidp dp) static inline int16_t __attribute__((__artificial__)) __attribute__((__nonnull__(1))) -__attribute__((__pure__)) __attribute__((__unused__)) efidp_subtype(const_efidp dp) { @@ -736,7 +734,6 @@ efidp_subtype(const_efidp dp) static inline ssize_t __attribute__((__artificial__)) __attribute__((__nonnull__(1))) -__attribute__((__pure__)) __attribute__((__unused__)) __attribute__((__warn_unused_result__)) efidp_node_size(const_efidp dn) @@ -751,7 +748,6 @@ efidp_node_size(const_efidp dn) static inline int __attribute__((__artificial__)) __attribute__((__nonnull__(1, 2))) -__attribute__((__pure__)) __attribute__((__unused__)) __attribute__((__warn_unused_result__)) efidp_next_node(const_efidp in, const_efidp *out) @@ -774,7 +770,6 @@ efidp_next_node(const_efidp in, const_efidp *out) static inline int __attribute__((__artificial__)) __attribute__((__nonnull__(1, 2))) -__attribute__((__pure__)) __attribute__((__unused__)) __attribute__((__warn_unused_result__)) efidp_next_instance(const_efidp in, const_efidp *out) @@ -799,7 +794,6 @@ efidp_next_instance(const_efidp in, const_efidp *out) static inline int __attribute__((__artificial__)) __attribute__((__nonnull__(1))) -__attribute__((__pure__)) __attribute__((__unused__)) __attribute__((__warn_unused_result__)) efidp_is_multiinstance(const_efidp dn) @@ -829,7 +823,6 @@ efidp_is_multiinstance(const_efidp dn) static inline int __attribute__((__artificial__)) __attribute__((__nonnull__(1, 2))) -__attribute__((__pure__)) __attribute__((__unused__)) __attribute__((__warn_unused_result__)) efidp_get_next_end(const_efidp in, const_efidp *out) @@ -854,7 +847,6 @@ efidp_get_next_end(const_efidp in, const_efidp *out) static inline ssize_t __attribute__((__artificial__)) __attribute__((__nonnull__(1))) -__attribute__((__pure__)) __attribute__((__unused__)) __attribute__((__warn_unused_result__)) efidp_size(const_efidp dp) @@ -896,7 +888,6 @@ efidp_size(const_efidp dp) static inline ssize_t __attribute__((__artificial__)) __attribute__((__nonnull__(1))) -__attribute__((__pure__)) __attribute__((__unused__)) __attribute__((__warn_unused_result__)) efidp_instance_size(const_efidp dpi) @@ -927,7 +918,6 @@ static inline int __attribute__((__artificial__)) __attribute__((__nonnull__(1))) __attribute__((__unused__)) -__attribute__((__nonnull__ (1))) efidp_is_valid(const_efidp dp, ssize_t limit) { efidp_header *hdr = (efidp_header *)dp;