summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-03-17 10:13:50 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-03-17 10:13:50 +0200
commit75e39f3cba01f9f3a835d8e311658bcbf0453d5d (patch)
treed42da14357de605597cf3743555c103159ac4cac
parent0f56e21efa68ba3b37d1171d001c21845c3d2b7d (diff)
downloadmariadb-git-75e39f3cba01f9f3a835d8e311658bcbf0453d5d.tar.gz
Fix gcc-12 -O2 -Wmaybe-uninitialized
-rw-r--r--storage/innobase/fil/fil0fil.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index 8075defac4c..6980078f87d 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -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
@@ -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. */