Skip to content

Commit 4f7a5f7

Browse files
committed
Fix clang-21 -Wuninitialized-const-pointer
pfs_get_thread_file_name_locker_v1(): Note that the last parameter is unused. Let us pass it as NULL to avoid the warning.
1 parent 8dae715 commit 4f7a5f7

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

include/mysql/psi/mysql_file.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ inline_mysql_file_stat(
775775
#ifdef HAVE_PSI_FILE_INTERFACE
776776
struct PSI_file_locker *locker;
777777
PSI_file_locker_state state;
778-
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STAT, path, &locker);
778+
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STAT, path, NULL);
779779
if (psi_likely(locker != NULL))
780780
{
781781
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
@@ -1025,7 +1025,7 @@ inline_mysql_file_create(
10251025
struct PSI_file_locker *locker;
10261026
PSI_file_locker_state state;
10271027
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
1028-
&locker);
1028+
NULL);
10291029
if (psi_likely(locker != NULL))
10301030
{
10311031
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
@@ -1051,7 +1051,7 @@ inline_mysql_file_create_temp(
10511051
struct PSI_file_locker *locker;
10521052
PSI_file_locker_state state;
10531053
locker= PSI_FILE_CALL(get_thread_file_name_locker)
1054-
(&state, key, PSI_FILE_CREATE, NULL, &locker);
1054+
(&state, key, PSI_FILE_CREATE, NULL, NULL);
10551055
if (psi_likely(locker != NULL))
10561056
{
10571057
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
@@ -1078,7 +1078,7 @@ inline_mysql_file_open(
10781078
struct PSI_file_locker *locker;
10791079
PSI_file_locker_state state;
10801080
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
1081-
&locker);
1081+
NULL);
10821082
if (psi_likely(locker != NULL))
10831083
{
10841084
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
@@ -1298,7 +1298,7 @@ inline_mysql_file_delete(
12981298
#ifdef HAVE_PSI_FILE_INTERFACE
12991299
struct PSI_file_locker *locker;
13001300
PSI_file_locker_state state;
1301-
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, &locker);
1301+
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, NULL);
13021302
if (psi_likely(locker != NULL))
13031303
{
13041304
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
@@ -1324,7 +1324,7 @@ inline_mysql_file_rename(
13241324
struct PSI_file_locker *locker;
13251325
PSI_file_locker_state state;
13261326
locker= PSI_FILE_CALL(get_thread_file_name_locker)
1327-
(&state, key, PSI_FILE_RENAME, from, &locker);
1327+
(&state, key, PSI_FILE_RENAME, from, NULL);
13281328
if (psi_likely(locker != NULL))
13291329
{
13301330
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
@@ -1352,7 +1352,7 @@ inline_mysql_file_create_with_symlink(
13521352
struct PSI_file_locker *locker;
13531353
PSI_file_locker_state state;
13541354
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
1355-
&locker);
1355+
NULL);
13561356
if (psi_likely(locker != NULL))
13571357
{
13581358
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
@@ -1383,7 +1383,7 @@ inline_mysql_file_delete_with_symlink(
13831383
struct PSI_file_locker *locker;
13841384
PSI_file_locker_state state;
13851385
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, fullname,
1386-
&locker);
1386+
NULL);
13871387
if (psi_likely(locker != NULL))
13881388
{
13891389
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
@@ -1410,7 +1410,7 @@ inline_mysql_file_rename_with_symlink(
14101410
struct PSI_file_locker *locker;
14111411
PSI_file_locker_state state;
14121412
locker= PSI_FILE_CALL(get_thread_file_name_locker)
1413-
(&state, key, PSI_FILE_RENAME, from, &locker);
1413+
(&state, key, PSI_FILE_RENAME, from, NULL);
14141414
if (psi_likely(locker != NULL))
14151415
{
14161416
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);

storage/innobase/include/os0file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ are used to register file deletion operations*/
470470
src_file, src_line) \
471471
do { \
472472
locker = PSI_FILE_CALL(get_thread_file_name_locker)( \
473-
state, key, op, name, &locker); \
473+
state, key, op, name, nullptr); \
474474
if (locker != NULL) { \
475475
PSI_FILE_CALL(start_file_open_wait)( \
476476
locker, src_file, src_line); \

storage/perfschema/pfs.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3247,7 +3247,7 @@ PSI_file_locker*
32473247
pfs_get_thread_file_name_locker_v1(PSI_file_locker_state *state,
32483248
PSI_file_key key,
32493249
PSI_file_operation op,
3250-
const char *name, const void *identity)
3250+
const char *name, const void *)
32513251
{
32523252
assert(static_cast<int> (op) >= 0);
32533253
assert(static_cast<uint> (op) < array_elements(file_operation_map));

0 commit comments

Comments
 (0)