Skip to content

Commit

Permalink
largepages: osx compile warning fix
Browse files Browse the repository at this point in the history
my_is_2pow is only used on linux.

fixes compile warning:

mysys/my_largepage.c:48:23: warning: unused function 'my_is_2pow' [-Wunused-function]

static inline my_bool my_is_2pow(size_t n) { return !((n) & ((n) - 1)); }

                      ^

1 warning generated.
  • Loading branch information
grooverdan authored and Sergey Vojtovich committed May 18, 2020
1 parent 23047d3 commit 3ea05d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mysys/my_largepage.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ static my_bool my_use_large_pages= 0;
#define my_use_large_pages 0
#endif

static inline my_bool my_is_2pow(size_t n) { return !((n) & ((n) - 1)); }

#if defined(HAVE_GETPAGESIZES) || defined(__linux__)
/* Descending sort */

Expand Down Expand Up @@ -76,6 +74,8 @@ static size_t my_large_page_sizes[my_large_page_sizes_length];
Linux-specific function to determine the sizes of large pages
*/
#ifdef __linux__
static inline my_bool my_is_2pow(size_t n) { return !((n) & ((n) - 1)); }

static void my_get_large_page_sizes(size_t sizes[my_large_page_sizes_length])
{
DIR *dirp;
Expand Down

0 comments on commit 3ea05d0

Please sign in to comment.