[Bf-blender-cvs] [d3c454d66c0] master: Cleanup: compiler warnings

Campbell Barton noreply at git.blender.org
Fri Jul 16 03:53:46 CEST 2021


Commit: d3c454d66c0a730eafa7edecec158ca3b9edb2d7
Author: Campbell Barton
Date:   Fri Jul 16 11:45:03 2021 +1000
Branches: master
https://developer.blender.org/rBd3c454d66c0a730eafa7edecec158ca3b9edb2d7

Cleanup: compiler warnings

===================================================================

M	source/blender/editors/asset/asset_list.cc
M	source/blender/editors/include/ED_armature.h
M	source/blender/editors/interface/interface_template_asset_view.cc
M	source/blender/makesrna/intern/rna_asset.c
M	source/blender/makesrna/intern/rna_space.c
M	source/blender/windowmanager/WM_api.h
M	source/blender/windowmanager/intern/wm_uilist_type.c

===================================================================

diff --git a/source/blender/editors/asset/asset_list.cc b/source/blender/editors/asset/asset_list.cc
index 1ea948d97d4..e8ed3958231 100644
--- a/source/blender/editors/asset/asset_list.cc
+++ b/source/blender/editors/asset/asset_list.cc
@@ -301,7 +301,7 @@ void AssetList::clear(bContext *C)
   filelist_freelib(files);
   filelist_clear(files);
 
-  WM_main_add_notifier(NC_ASSET | ND_ASSET_LIST, NULL);
+  WM_main_add_notifier(NC_ASSET | ND_ASSET_LIST, nullptr);
 }
 
 /**
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index eaa54f66928..51d8aa8b064 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -255,8 +255,8 @@ struct PoseBackup *ED_pose_backup_create_selected_bones(
 struct PoseBackup *ED_pose_backup_create_all_bones(
     const struct Object *ob, const struct bAction *action) ATTR_WARN_UNUSED_RESULT;
 bool ED_pose_backup_is_selection_relevant(const struct PoseBackup *pose_backup);
-void ED_pose_backup_restore(const struct PoseBackup *pose_backup);
-void ED_pose_backup_free(struct PoseBackup *pose_backup);
+void ED_pose_backup_restore(const struct PoseBackup *pbd);
+void ED_pose_backup_free(struct PoseBackup *pbd);
 
 #ifdef __cplusplus
 }
diff --git a/source/blender/editors/interface/interface_template_asset_view.cc b/source/blender/editors/interface/interface_template_asset_view.cc
index 2860abb32a1..5a05813f947 100644
--- a/source/blender/editors/interface/interface_template_asset_view.cc
+++ b/source/blender/editors/interface/interface_template_asset_view.cc
@@ -53,7 +53,7 @@ static void asset_view_item_but_drag_set(uiBut *but,
                                          AssetHandle *asset_handle)
 {
   ID *id = asset_handle->file_data->id;
-  if (id != NULL) {
+  if (id != nullptr) {
     UI_but_drag_set_id(but, id);
     return;
   }
@@ -257,14 +257,14 @@ void uiTemplateAssetView(uiLayout *layout,
 
   if (activate_opname) {
     PointerRNA *ptr = UI_list_custom_activate_operator_set(
-        list, activate_opname, r_activate_op_properties != NULL);
+        list, activate_opname, r_activate_op_properties != nullptr);
     if (r_activate_op_properties && ptr) {
       *r_activate_op_properties = *ptr;
     }
   }
   if (drag_opname) {
     PointerRNA *ptr = UI_list_custom_drag_operator_set(
-        list, drag_opname, r_drag_op_properties != NULL);
+        list, drag_opname, r_drag_op_properties != nullptr);
     if (r_drag_op_properties && ptr) {
       *r_drag_op_properties = *ptr;
     }
diff --git a/source/blender/makesrna/intern/rna_asset.c b/source/blender/makesrna/intern/rna_asset.c
index 497f4f37ea3..0020d90ba1a 100644
--- a/source/blender/makesrna/intern/rna_asset.c
+++ b/source/blender/makesrna/intern/rna_asset.c
@@ -137,7 +137,7 @@ static void rna_AssetHandle_get_full_library_path(
     bContext *C,
     FileDirEntry *asset_file,
     AssetLibraryReference *library,
-    char r_result[FILE_MAX_LIBEXTRA])
+    char r_result[/*FILE_MAX_LIBEXTRA*/])
 {
   AssetHandle asset = {.file_data = asset_file};
   ED_asset_handle_get_full_library_path(C, library, &asset, r_result);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 0019f315bbe..f2d2b190d87 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2699,7 +2699,7 @@ static const EnumPropertyItem *rna_FileBrowser_FileSelectEntry_id_type_itemf(
 {
   const FileDirEntry *entry = ptr->data;
   if (entry->blentype == 0) {
-    const static EnumPropertyItem none_items[] = {
+    static const EnumPropertyItem none_items[] = {
         {0, "NONE", 0, "None", ""},
     };
     return none_items;
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 66e91526009..1c994707ca9 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -623,7 +623,7 @@ void WM_uilisttype_free(void);
 
 void WM_uilisttype_to_full_list_id(const struct uiListType *ult,
                                    const char *list_id,
-                                   char *r_ui_list_id);
+                                   char r_full_list_id[]);
 const char *WM_uilisttype_list_id_get(const struct uiListType *ult, struct uiList *list);
 
 /* wm_menu_type.c */
diff --git a/source/blender/windowmanager/intern/wm_uilist_type.c b/source/blender/windowmanager/intern/wm_uilist_type.c
index 468ea7e4d5b..53193deae8c 100644
--- a/source/blender/windowmanager/intern/wm_uilist_type.c
+++ b/source/blender/windowmanager/intern/wm_uilist_type.c
@@ -163,7 +163,7 @@ void WM_uilisttype_free(void)
  */
 void WM_uilisttype_to_full_list_id(const uiListType *ult,
                                    const char *list_id,
-                                   char r_full_list_id[UI_MAX_NAME_STR])
+                                   char r_full_list_id[/*UI_MAX_NAME_STR*/])
 {
   /* We tag the list id with the list type... */
   BLI_snprintf(r_full_list_id, UI_MAX_NAME_STR, "%s_%s", ult->idname, list_id ? list_id : "");



More information about the Bf-blender-cvs mailing list