diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-28 18:53:50 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-28 18:53:50 +0300 |
commit | 099120e54a8b9cb8f9b0173db7bc5a7807300082 (patch) | |
tree | da0cf81e897ff35d9b86ccc364ea55bbe8a9cd10 /source | |
parent | 024386bb891d9722c3ac0238532706cb67abdeb7 (diff) |
Cleanup: Fix compiler warnings
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image_format.cc | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/key.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 2 | ||||
-rw-r--r-- | source/blender/editors/geometry/geometry_attributes.cc | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/image_format.cc b/source/blender/blenkernel/intern/image_format.cc index 3ff0b3da963..30be1fdaba7 100644 --- a/source/blender/blenkernel/intern/image_format.cc +++ b/source/blender/blenkernel/intern/image_format.cc @@ -514,8 +514,9 @@ static bool do_add_image_extension(char *string, #endif #ifdef WITH_WEBP else if (imtype == R_IMF_IMTYPE_WEBP) { - if (!BLI_path_extension_check(string, extension_test = ".webp")) + if (!BLI_path_extension_check(string, extension_test = ".webp")) { extension = extension_test; + } } #endif else { // R_IMF_IMTYPE_AVIRAW, R_IMF_IMTYPE_AVIJPEG, R_IMF_IMTYPE_JPEG90 etc diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 18302c514e1..594cffe6406 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -1759,7 +1759,7 @@ Key *BKE_key_from_id(ID *id) return NULL; } -Key **BKE_key_from_object_p( Object *ob) +Key **BKE_key_from_object_p(Object *ob) { if (ob == NULL || ob->data == NULL) { return NULL; @@ -1768,7 +1768,7 @@ Key **BKE_key_from_object_p( Object *ob) return BKE_key_from_id_p(ob->data); } -Key *BKE_key_from_object( Object *ob) +Key *BKE_key_from_object(Object *ob) { Key **key_p; key_p = BKE_key_from_object_p(ob); @@ -1922,7 +1922,7 @@ char *BKE_keyblock_curval_rnapath_get(const Key *key, const KeyBlock *kb) } /* create the RNA pointer */ - RNA_pointer_create(&key->id, &RNA_ShapeKey, kb, &ptr); + RNA_pointer_create((ID *)&key->id, &RNA_ShapeKey, (KeyBlock *)kb, &ptr); /* get pointer to the property too */ prop = RNA_struct_find_property(&ptr, "value"); diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index e7ee8caf0eb..5ffd253be3b 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -682,7 +682,7 @@ ModifierData *BKE_modifiers_get_virtual_modifierlist(const Object *ob, } /* shape key modifier, not yet for curves */ - if (ELEM(ob->type, OB_MESH, OB_LATTICE) && BKE_key_from_object(ob)) { + if (ELEM(ob->type, OB_MESH, OB_LATTICE) && BKE_key_from_object((Object *)ob)) { if (ob->type == OB_MESH && (ob->shapeflag & OB_SHAPE_EDIT_MODE)) { virtualModifierData->smd.modifier.mode |= eModifierMode_Editmode | eModifierMode_OnCage; } diff --git a/source/blender/editors/geometry/geometry_attributes.cc b/source/blender/editors/geometry/geometry_attributes.cc index f1c1fdf6255..b1c05cf44b1 100644 --- a/source/blender/editors/geometry/geometry_attributes.cc +++ b/source/blender/editors/geometry/geometry_attributes.cc @@ -344,7 +344,7 @@ static int geometry_attribute_convert_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void geometry_color_attribute_add_ui(bContext *C, wmOperator *op) +static void geometry_color_attribute_add_ui(bContext *UNUSED(C), wmOperator *op) { uiLayout *layout = op->layout; uiLayoutSetPropSep(layout, true); |