Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-03 19:36:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-03 19:36:36 +0400
commit451136e7c0860b5240d4fcec50c95cd4790b8e2b (patch)
tree3aa82cfa85e29370f0b55f541d275b18590f415a
parenta01ffbbddb40c8f14f10aa5edf0cd1ba5dcc6942 (diff)
warning fixes
-rw-r--r--intern/iksolver/intern/IK_QSegment.cpp2
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.c2
-rw-r--r--source/blender/collada/DocumentExporter.cpp7
-rw-r--r--source/blender/collada/ExtraTags.cpp12
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c2
5 files changed, 9 insertions, 16 deletions
diff --git a/intern/iksolver/intern/IK_QSegment.cpp b/intern/iksolver/intern/IK_QSegment.cpp
index df4fbc8fadd..ba4fbb88542 100644
--- a/intern/iksolver/intern/IK_QSegment.cpp
+++ b/intern/iksolver/intern/IK_QSegment.cpp
@@ -319,7 +319,7 @@ void IK_QSegment::RemoveChild(IK_QSegment *child)
else {
IK_QSegment *seg = m_child;
- while (seg->m_sibling != child);
+ while (seg->m_sibling != child)
seg = seg->m_sibling;
if (child == seg->m_sibling)
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index 9c916d517c5..70398594872 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -166,7 +166,7 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totve
}
if(BLI_edgehash_haskey(edge_hash, med->v1, med->v2)) {
- PRINT(" edge %u: is a duplicate of, %u\n", i, GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, med->v1, med->v2)));
+ PRINT(" edge %u: is a duplicate of, %d\n", i, GET_INT_FROM_POINTER(BLI_edgehash_lookup(edge_hash, med->v1, med->v2)));
remove= do_fixes;
}
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index 285ab283b37..6e780889d16 100644
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@ -328,9 +328,7 @@ void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename, bool
//scale = RNA_struct_find_property(&unit_settings, "scale_length");
std::string unitname = "meter";
- float linearmeasure = 1.0f;
-
- linearmeasure = RNA_float_get(&unit_settings, "scale_length");
+ float linearmeasure = RNA_float_get(&unit_settings, "scale_length");
switch(RNA_property_enum_get(&unit_settings, system)) {
case USER_UNIT_NONE:
@@ -368,8 +366,7 @@ void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename, bool
asset.setUnit(unitname, linearmeasure);
asset.setUpAxisType(COLLADASW::Asset::Z_UP);
- // TODO: need an Author field in userpref
- if(strlen(U.author) > 0) {
+ if(U.author[0] != '\0') {
asset.getContributor().mAuthor = U.author;
}
else {
diff --git a/source/blender/collada/ExtraTags.cpp b/source/blender/collada/ExtraTags.cpp
index 653d4a377cd..f0c6d2228b1 100644
--- a/source/blender/collada/ExtraTags.cpp
+++ b/source/blender/collada/ExtraTags.cpp
@@ -90,32 +90,28 @@ std::string ExtraTags::asString( std::string tag, bool *ok)
void ExtraTags::setData(std::string tag, short *data)
{
bool ok = false;
- int tmp = 0;
- tmp = asInt(tag, &ok);
+ int tmp = asInt(tag, &ok);
if(ok)
*data = (short)tmp;
}
void ExtraTags::setData(std::string tag, int *data)
{
bool ok = false;
- int tmp = 0;
- tmp = asInt(tag, &ok);
+ int tmp = asInt(tag, &ok);
if(ok)
*data = tmp;
}
void ExtraTags::setData(std::string tag, float *data)
{
bool ok = false;
- float tmp = 0.0f;
- tmp = asFloat(tag, &ok);
+ float tmp = asFloat(tag, &ok);
if(ok)
*data = tmp;
}
void ExtraTags::setData(std::string tag, char *data)
{
bool ok = false;
- int tmp = 0;
- tmp = asInt(tag, &ok);
+ int tmp = asInt(tag, &ok);
if(ok)
*data = (char)tmp;
}
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 1220c4f34a1..fd7987c18a2 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -111,7 +111,7 @@ void RNA_api_scene(StructRNA *srna)
#ifdef WITH_COLLADA
/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
func= RNA_def_function(srna, "collada_export", "rna_Scene_collada_export");
- parm= RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file.");
+ RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file.");
parm= RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements.");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */