Skip to content

Commit

Permalink
Don't use __pure__ on efidp_*() functions.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
vathpela committed Sep 27, 2016
1 parent 0a3f9d5 commit 0ebf6f6
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/include/efivar/efivar-dp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0ebf6f6

Please sign in to comment.