diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-10 09:51:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-10 09:51:09 +0300 |
commit | 4d4608363c40c93621a9879c26d0a13a20dc974b (patch) | |
tree | 1fd792fffc3f65095851146cb011a9b74609ff82 | |
parent | 7141eb75efae9574607593372c18ccab56b13bbf (diff) |
Cleanup: quiet array-parameter warning from GCC11
-rw-r--r-- | source/blender/blenlib/BLI_fileops.h | 18 | ||||
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 2 |
2 files changed, 13 insertions, 7 deletions
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")) { |