diff options
author | Daniel Black <daniel@linux.ibm.com> | 2020-04-29 09:41:28 +1000 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2020-05-18 19:43:50 +0400 |
commit | 3ea05d08427dc3d679fef838e9334685f556cc32 (patch) | |
tree | aae55350797be8c38bb8eee69eae13cc29467c38 | |
parent | 23047d3ed42eacb5eaa5475a8fa4161550d01c52 (diff) | |
download | mariadb-git-3ea05d08427dc3d679fef838e9334685f556cc32.tar.gz |
largepages: osx compile warning fix
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.
-rw-r--r-- | mysys/my_largepage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_largepage.c b/mysys/my_largepage.c index 32897087f9e..447d5c50a59 100644 --- a/mysys/my_largepage.c +++ b/mysys/my_largepage.c @@ -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 */ @@ -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; |