mirror of
https://github.com/MariaDB/server.git
synced 2025-10-25 08:58:14 +02:00
os_innodb_umask was of the incorrect type resulting in warnings
in clang-19. The correct type is mode_t.
As os_innodb_umask was set during innnodb_init from my_umask,
corrected the type there along with its companion my_umask_dir.
Because of this, the defaults mask values in innodb never
had an effect.
The resulting change allow found signed differences in
my_create{,_nosymlink}, open_nosymlinks:
mysys/my_create.c:47:20: error: operand of ?: changes signedness from ‘int’ to ‘mode_t’ {aka ‘unsigned int’} due to unsignedness of other operand [-Werror=sign-compare]
47 | CreateFlags ? CreateFlags : my_umask);
Ref: clang-19 warnings:
[55/123] Building CXX object storage/innobase/CMakeFiles/innobase.dir/os/os0file.cc.o
storage/innobase/os/os0file.cc:1075:46: warning: implicit conversion loses integer precision: 'ulint' (aka 'unsigned long') to 'mode_t' (aka 'unsigned int') [-Wshorten-64-to-32]
1075 | file = open(name, create_flag | O_CLOEXEC, os_innodb_umask);
| ~~~~ ^~~~~~~~~~~~~~~
storage/innobase/os/os0file.cc:1249:46: warning: implicit conversion loses integer precision: 'ulint' (aka 'unsigned long') to 'mode_t' (aka 'unsigned int') [-Wshorten-64-to-32]
1249 | file = open(name, create_flag | O_CLOEXEC, os_innodb_umask);
| ~~~~ ^~~~~~~~~~~~~~~
storage/innobase/os/os0file.cc:1381:45: warning: implicit conversion loses integer precision: 'ulint' (aka 'unsigned long') to 'mode_t' (aka 'unsigned int') [-Wshorten-64-to-32]
1381 | file = open(name, create_flag | O_CLOEXEC, os_innodb_umask);
| ~~~~ ^~~~~~~~~~~~~~~
|
||
|---|---|---|
| .. | ||
| btr | ||
| buf | ||
| data | ||
| dict | ||
| eval | ||
| fil | ||
| fsp | ||
| fts | ||
| fut | ||
| gis | ||
| ha | ||
| handler | ||
| ibuf | ||
| include | ||
| lock | ||
| log | ||
| mem | ||
| mtr | ||
| mysql-test/storage_engine | ||
| os | ||
| page | ||
| pars | ||
| que | ||
| read | ||
| rem | ||
| row | ||
| srv | ||
| sync | ||
| trx | ||
| unittest | ||
| ut | ||
| .clang-format-old | ||
| bzip2.cmake | ||
| CMakeLists.txt | ||
| compile-innodb | ||
| COPYING.Google | ||
| COPYING.Percona | ||
| lz4.cmake | ||
| lzma.cmake | ||
| lzo.cmake | ||
| snappy.cmake | ||