Description:
Related to Bug#35507223 and commit 89c0115d873016f23003603d042155cbf2287571 @Daniel Blanchard
This change made all ACL bitmask variables explicitly 32 bits, but there are still some variables left not changed to `Access_bitmask`.
I suggest changing them all to `Access_bitmask` for safety and maintainability.
How to repeat:
mkdir build
cd build
sed -i 's/" -Werror"/" -Wconversion"/g' ../cmake/maintainer.cmake
cmake .. -DCMAKE_INSTALL_PREFIX="$HOME/mysql" -DWITH_DEBUG=1
make -j$(nproc) 2>build.stderr.log
grep 'warning:.*Access_bitmask' build.stderr.log | sort -u
Suggested fix:
The build logs are as below. Fix them by changing the variable types to `Access_bitmask`.
/home/repo/mysql-server/sql/auth/partial_revokes.cc:188:43: warning: conversion from ‘long unsigned int’ to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]
/home/repo/mysql-server/sql/event_data_objects.cc:1203:70: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]
/home/repo/mysql-server/sql/event_data_objects.cc:1211:50: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]
/home/repo/mysql-server/sql/server_component/persistent_dynamic_loader.cc:159:35: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]
/home/repo/mysql-server/sql/sql_db.cc:1369:52: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]
/home/repo/mysql-server/sql/sql_insert.cc:1061:44: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]
/home/repo/mysql-server/sql/sql_insert.cc:1061:55: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]
/home/repo/mysql-server/sql/sql_insert.cc:439:35: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]
/home/repo/mysql-server/sql/sql_parse.cc:1802:64: warning: conversion from ‘long unsigned int’ to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]
/home/repo/mysql-server/sql/sql_update.cc:150:36: warning: conversion from ‘long int’ to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]
/home/repo/mysql-server/sql/sql_update.cc:152:35: warning: conversion from ‘long int’ to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]