Fix: correct fixed sizes of strings used with MAX_ID_NAME

Resolve warnings raised by "make check_size_comments",
missed from !137196.
This commit is contained in:
Campbell Barton
2025-07-09 02:55:53 +00:00
parent 4d7f2f436b
commit d36ce2fe6d
3 changed files with 8 additions and 5 deletions

View File

@@ -227,7 +227,7 @@ void BLO_read_do_version_after_setup(Main *new_bmain,
* \{ */
struct BLODataBlockInfo {
char name[/*MAX_ID_NAME-2*/ 64];
char name[/*MAX_ID_NAME-2*/ 256];
AssetMetaData *asset_data;
/** Ownership over #asset_data above can be "stolen out" of this struct, for more permanent
* storage. In that case, set this to false to avoid double freeing of the stolen data. */

View File

@@ -635,8 +635,11 @@ typedef struct HookGpencilModifierData {
char subtarget[/*MAX_NAME*/ 64];
/** Layer name. */
char layername[/*MAX_NAME*/ 64];
/** Material name. */
char materialname[/*MAX_ID_NAME - 2*/ 64] DNA_DEPRECATED;
/**
* Material name.
* \note as this is legacy there is no need to use the current size of an ID name.
*/
char materialname[/*MAX_ID_NAME - 194*/ 64] DNA_DEPRECATED;
/** Optional vertex-group name. */
char vgname[/*MAX_VGROUP_NAME*/ 64];
/** Custom index for passes. */

View File

@@ -311,7 +311,7 @@ typedef struct uiList { /* some list UI data need to be saved in file */
/** Runtime. */
struct uiListType *type;
char list_id[/*UI_MAX_NAME_STR*/ 128];
char list_id[/*UI_MAX_NAME_STR*/ 256];
/** How items are laid out in the list. */
int layout_type;
@@ -324,7 +324,7 @@ typedef struct uiList { /* some list UI data need to be saved in file */
/* Filtering data. */
/** Defined as . */
char filter_byname[/*UI_MAX_NAME_STR*/ 128];
char filter_byname[/*UI_MAX_NAME_STR*/ 256];
int filter_flag;
int filter_sort_flag;