[Bf-blender-cvs] [4d4608363c4] master: Cleanup: quiet array-parameter warning from GCC11
Campbell Barton
noreply at git.blender.org
Thu Jun 10 08:53:40 CEST 2021
Commit: 4d4608363c40c93621a9879c26d0a13a20dc974b
Author: Campbell Barton
Date: Thu Jun 10 16:51:09 2021 +1000
Branches: master
https://developer.blender.org/rB4d4608363c40c93621a9879c26d0a13a20dc974b
Cleanup: quiet array-parameter warning from GCC11
===================================================================
M source/blender/blenlib/BLI_fileops.h
M source/blender/blenlib/intern/storage.c
===================================================================
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index bf18dd1070e..7cfecc798a7 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -34,6 +34,7 @@
#include <limits.h> /* for PATH_MAX */
#include "BLI_compiler_attrs.h"
+#include "BLI_fileops_types.h"
#include "BLI_utildefines.h"
#ifdef __cplusplus
@@ -125,15 +126,20 @@ void BLI_filelist_free(struct direntry *filelist, const unsigned int nrentries);
void BLI_filelist_entry_size_to_string(const struct stat *st,
const uint64_t sz,
const bool compact,
- char r_size[]);
-void BLI_filelist_entry_mode_to_string(
- const struct stat *st, const bool compact, char r_mode1[], char r_mode2[], char r_mode3[]);
-void BLI_filelist_entry_owner_to_string(const struct stat *st, const bool compact, char r_owner[]);
+ char r_size[FILELIST_DIRENTRY_SIZE_LEN]);
+void BLI_filelist_entry_mode_to_string(const struct stat *st,
+ const bool compact,
+ char r_mode1[FILELIST_DIRENTRY_MODE_LEN],
+ char r_mode2[FILELIST_DIRENTRY_MODE_LEN],
+ char r_mode3[FILELIST_DIRENTRY_MODE_LEN]);
+void BLI_filelist_entry_owner_to_string(const struct stat *st,
+ const bool compact,
+ char r_owner[FILELIST_DIRENTRY_OWNER_LEN]);
void BLI_filelist_entry_datetime_to_string(const struct stat *st,
const int64_t ts,
const bool compact,
- char r_time[],
- char r_date[],
+ char r_time[FILELIST_DIRENTRY_TIME_LEN],
+ char r_date[FILELIST_DIRENTRY_DATE_LEN],
bool *r_is_today,
bool *r_is_yesterday);
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 5f823396ed9..8964dac31a9 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -293,7 +293,7 @@ bool BLI_file_alias_target(const char *filepath,
/* This parameter can only be `const` on Linux since
* redirections are not supported there.
* NOLINTNEXTLINE: readability-non-const-parameter. */
- char r_targetpath[FILE_MAXDIR])
+ char r_targetpath[/*FILE_MAXDIR*/])
{
# ifdef WIN32
if (!BLI_path_extension_check(filepath, ".lnk")) {
More information about the Bf-blender-cvs
mailing list