Skip to content

Commit

Permalink
Fix gcc-12 -O2 -Wmaybe-uninitialized
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Mar 17, 2022
1 parent 0f56e21 commit 75e39f3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions storage/innobase/fil/fil0fil.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2021, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 2021, MariaDB Corporation.
Copyright (c) 2014, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -3316,10 +3316,11 @@ fil_make_filepath(
if (path != NULL) {
memcpy(full_name, path, path_len);
len = path_len;
full_name[len] = '\0';
os_normalize_path(full_name);
}

full_name[len] = '\0';
os_normalize_path(full_name);

if (trim_name) {
/* Find the offset of the last DIR separator and set it to
null in order to strip off the old basename from this path. */
Expand Down

0 comments on commit 75e39f3

Please sign in to comment.