Skip to content

Commit

Permalink
lib: Fix warning with gcc7's -Wint-in-bool-context
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Oct 5, 2017
1 parent 7daf9f4 commit e991041
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/buffer.h
Expand Up @@ -20,10 +20,10 @@ void buffer_create_from_const_data(buffer_t *buffer,
const void *data, size_t size);
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 401
#define buffer_create_from_data(b,d,s) ({ \
(void)COMPILE_ERROR_IF_TRUE(__builtin_object_size((d),1) < ((s)?(s):1)); \
(void)COMPILE_ERROR_IF_TRUE(__builtin_object_size((d),1) < ((s)>0?(s):1)); \
buffer_create_from_data((b), (d), (s)); })
#define buffer_create_from_const_data(b,d,s) ({ \
(void)COMPILE_ERROR_IF_TRUE(__builtin_object_size((d),1) < ((s)?(s):1)); \
(void)COMPILE_ERROR_IF_TRUE(__builtin_object_size((d),1) < ((s)>0?(s):1)); \
buffer_create_from_const_data((b), (d), (s)); })
#endif
/* Creates a dynamically growing buffer. Whenever write would exceed the
Expand Down

0 comments on commit e991041

Please sign in to comment.