1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-21907: Fix some -Wconversion outside InnoDB

Some .c and .cc files are compiled as part of Mariabackup.
Enabling -Wconversion for InnoDB would also enable it for
Mariabackup. The .h files are being included during
InnoDB or Mariabackup compilation.

Notably, GCC 5 (but not GCC 4 or 6 or later versions)
would report -Wconversion for x|=y when the type is
unsigned char. So, we will either write x=(uchar)(x|y)
or disable the -Wconversion warning for GCC 5.

bitmap_set_bit(), bitmap_flip_bit(), bitmap_clear_bit(), bitmap_is_set():
Always implement as inline functions.
This commit is contained in:
Marko Mäkelä
2020-03-12 19:44:52 +02:00
parent c7920fa8ff
commit d82ac8d374
13 changed files with 137 additions and 156 deletions

View File

@@ -353,10 +353,10 @@ size_t my_setstacksize(pthread_attr_t *attr, size_t stacksize);
#endif /* !cmp_timespec */
#ifndef set_timespec_time_nsec
#define set_timespec_time_nsec(ABSTIME,NSEC) do { \
ulonglong _now_= (NSEC); \
(ABSTIME).MY_tv_sec= (_now_ / 1000000000ULL); \
(ABSTIME).MY_tv_nsec= (_now_ % 1000000000ULL); \
#define set_timespec_time_nsec(ABSTIME,NSEC) do { \
ulonglong _now_= (NSEC); \
(ABSTIME).MY_tv_sec= (time_t) (_now_ / 1000000000ULL); \
(ABSTIME).MY_tv_nsec= (ulong) (_now_ % 1000000000UL); \
} while(0)
#endif /* !set_timespec_time_nsec */