Code cleanup: warning fixes.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 5 Sep 2011 19:27:21 +0000 (19:27 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 5 Sep 2011 19:27:21 +0000 (19:27 +0000)
14 files changed:
source/blender/blenlib/BLI_math_inline.h
source/blender/collada/AnimationExporter.cpp
source/blender/collada/AnimationImporter.cpp
source/blender/collada/AnimationImporter.h
source/blender/collada/ArmatureImporter.cpp
source/blender/collada/DocumentImporter.cpp
source/blender/collada/TransformReader.cpp
source/blender/editors/space_logic/logic_window.c
source/blender/imbuf/intern/cineon/cineonlib.c
source/blender/imbuf/intern/cineon/logImageCore.h
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_texture.c
source/gameengine/VideoTexture/CMakeLists.txt

index 0f8493e25a6b4af97ae74861b4c850c5734511e6..122b2679d5b59ba8e89f5953547410230e999e6d 100644 (file)
@@ -45,7 +45,7 @@ extern "C" {
 #define MALWAYS_INLINE MINLINE
 #else
 #define MINLINE static inline
-#define MALWAYS_INLINE static __attribute__((always_inline))
+#define MALWAYS_INLINE static inline __attribute__((always_inline))
 #endif
 #else
 #define MINLINE
index 4c20d1cf6c18ded7308281f6faad6a5e524a9369..498ccb5709d1dfd62bfba2ffdcea48122261bb09 100644 (file)
@@ -643,6 +643,8 @@ std::string AnimationExporter::create_source_from_fcurve(COLLADASW::InputSemanti
                case COLLADASW::InputSemantic::OUT_TANGENT:
                        source.setAccessorStride(2);                    
                        break;
+               default:
+                       break;
        }
 
 
@@ -913,7 +915,7 @@ std::string AnimationExporter::get_light_param_sid(char *rna_path, int tm_type,
        }
 
        if (tm_name.size()) {
-               if (axis_name != "")
+               if (axis_name[0])
                        return tm_name + "." + std::string(axis_name);
                else 
                        return tm_name;
@@ -962,7 +964,7 @@ std::string AnimationExporter::get_camera_param_sid(char *rna_path, int tm_type,
        }
 
        if (tm_name.size()) {
-               if (axis_name != "")
+               if (axis_name[0])
                        return tm_name + "." + std::string(axis_name);
                else 
                        return tm_name;
@@ -1041,7 +1043,7 @@ std::string AnimationExporter::get_transform_sid(char *rna_path, int tm_type, co
                if (is_rotation)
                        return tm_name + std::string(axis_name) + ".ANGLE";
                else
-                       if (axis_name != "")
+                       if (axis_name[0])
                                return tm_name + "." + std::string(axis_name);
                        else 
                                return tm_name;
index 29c356ed8f00c3a2651972254fb9c81d6945be97..43428f57d4f92ffd61393e2f6a3b94dae8a63772 100644 (file)
@@ -90,12 +90,6 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve)
        COLLADAFW::FloatOrDoubleArray& input = curve->getInputValues();
        COLLADAFW::FloatOrDoubleArray& output = curve->getOutputValues();
 
-       if( curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_BEZIER ||
-               curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_STEP ) {
-                       COLLADAFW::FloatOrDoubleArray& intan = curve->getInTangentValues();
-                       COLLADAFW::FloatOrDoubleArray& outtan = curve->getOutTangentValues();
-       }
-
        float fps = (float)FPS;
        size_t dim = curve->getOutDimension();
        unsigned int i;
@@ -572,7 +566,7 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation *
 }
 
 //creates the rna_paths and array indices of fcurves from animations using color and bound animation class of each animation.
-void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,char * anim_type)
+void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,const char * anim_type)
 {
        char rna_path[100];
        BLI_strncpy(rna_path,anim_type, sizeof(rna_path));
@@ -615,7 +609,7 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list
 
 }
 
-void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, char * anim_type)
+void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type)
 {
        char rna_path[100];
        if (animlist_map.find(listid) == animlist_map.end()) return ;
@@ -803,7 +797,6 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
        }
 
        bAction * act;
-       bActionGroup *grp = NULL;
 
        if ( (animType->transform) != 0 )
        {
index ed9a2171c878921f884f5ae09c970536e6fc9574..9e8f7b42069d48cf2691dbcbe7c3801abd9ce2e1 100644 (file)
@@ -159,8 +159,8 @@ public:
                                                                         const COLLADAFW::AnimationList::AnimationBinding * binding,
                                                                         std::vector<FCurve*>* curves, bool is_joint, char * joint_path);
 
-       void Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,char * anim_type);
-       void Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, char * anim_type);
+       void Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type);
+       void Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type);
 
        int setAnimType ( const COLLADAFW::Animatable * prop , int type, int addition);
        
index 27aee133557c5a64d2e29a2a615062a26cf41e53..19fa54c5044e82fc7b95986fdc11ffb1171e099d 100644 (file)
@@ -95,8 +95,6 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p
        EditBone *bone = ED_armature_edit_bone_add((bArmature*)ob_arm->data, (char*)bc_get_joint_name(node));
        totbone++;
        
-       bPoseChannel *pchan  =  get_pose_channel(ob_arm->pose, (char*)bc_get_joint_name(node));
-
        if (parent) bone->parent = parent;
 
        float angle = 0;
@@ -280,8 +278,6 @@ void ArmatureImporter::add_leaf_bone(float mat[][4], EditBone *bone,  COLLADAFW:
        copy_m4_m4(leaf.mat, mat);
        BLI_strncpy(leaf.name, bone->name, sizeof(leaf.name));
        
-       float vec[3];
-
        TagsMap::iterator etit;
        ExtraTags *et = 0;
        etit = uid_tags_map.find(node->getUniqueId().toAscii());
@@ -579,7 +575,6 @@ void ArmatureImporter::set_pose ( Object * ob_arm ,  COLLADAFW::Node * root_node
        float mat[4][4];
    float obmat[4][4];
 
-   bArmature * arm = (bArmature * ) ob_arm-> data ; 
        float ax[3];
        float angle = NULL;
        
index 1a91e185bac2fbb0058c0f4bff60ade547abe0bb..586c6ccfe82804a2e5774de44208ab77d5732bc3 100644 (file)
@@ -240,15 +240,15 @@ void DocumentImporter::translate_anim_recursive(COLLADAFW::Node *node, COLLADAFW
                        root_map[node->getUniqueId()] = root_map[par->getUniqueId()];
        }
 
-       COLLADAFW::Transformation::TransformationType types[] = {
+       /*COLLADAFW::Transformation::TransformationType types[] = {
                COLLADAFW::Transformation::ROTATE,
                COLLADAFW::Transformation::SCALE,
                COLLADAFW::Transformation::TRANSLATE,
                COLLADAFW::Transformation::MATRIX
        };
 
+       Object *ob;*/
        unsigned int i;
-       Object *ob;
 
        //for (i = 0; i < 4; i++)
                //ob = 
index 0fd0c85aa092bd94fdfad290e393524bec4629ae..625a0220830c9ff62f510fcf0334a47f022b8b7d 100644 (file)
@@ -37,7 +37,6 @@ void TransformReader::get_node_mat(float mat[][4], COLLADAFW::Node *node, std::m
 {
        float cur[4][4];
        float copy[4][4];
-       float eul[3];
 
        unit_m4(mat);
        
index 920e93cc0fc1bc8d413b99a09e1ce65d0351e1df..20b001965aa132afbec86f355fc10b148b65e9e5 100644 (file)
@@ -3989,40 +3989,6 @@ static void draw_actuator_game(uiLayout *layout, PointerRNA *ptr)
                uiItemR(layout, ptr, "filename", 0, NULL, ICON_NONE);
 }
 
-/* The IPO/Fcurve actuator has been deprecated, so this is no longer used */
-static void draw_actuator_ipo(uiLayout *layout, PointerRNA *ptr)
-{
-       Object *ob;
-       PointerRNA settings_ptr;
-       uiLayout *row, *subrow, *col;
-
-       ob = (Object *)ptr->id.data;
-       RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
-
-       row= uiLayoutRow(layout, 0);
-       uiItemR(row, ptr, "play_type", 0, "", ICON_NONE);
-       subrow= uiLayoutRow(row, 1);
-       uiItemR(subrow, ptr, "use_force", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
-       uiItemR(subrow, ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
-
-       col = uiLayoutColumn(subrow, 0);
-       uiLayoutSetActive(col, (RNA_boolean_get(ptr, "use_additive") || RNA_boolean_get(ptr, "use_force")));
-       uiItemR(col, ptr, "use_local", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
-
-       row= uiLayoutRow(layout, 0);
-       if((RNA_enum_get(ptr, "play_type") == ACT_IPO_FROM_PROP))
-               uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE);
-
-       else {
-               uiItemR(row, ptr, "frame_start", 0, NULL, ICON_NONE);
-               uiItemR(row, ptr, "frame_end", 0, NULL, ICON_NONE);
-       }
-       uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NONE);
-
-       row= uiLayoutRow(layout, 0);
-       uiItemPointerR(row, ptr, "frame_property", &settings_ptr, "properties", NULL, ICON_NONE);
-}
-
 static void draw_actuator_message(uiLayout *layout, PointerRNA *ptr, bContext *C)
 {
        Object *ob;
index 922cfcf96293bbb118aa5ebcb22e6c17ac9d3db7..b4da39ac41eeb1b592a1c48035e0248e00fc5bd4 100644 (file)
@@ -36,6 +36,9 @@
 #include <netinet/in.h>         /* htonl() */
 #endif
 #include <string.h>                     /* memset */
+
+#include "BLI_utildefines.h"
+
 #include "cin_debug_stuff.h"
 #include "logmemfile.h"
 
@@ -288,7 +291,7 @@ initCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header, const c
 }
 
 static void
-dumpCineonGenericHeader(CineonGenericHeader* header) {
+UNUSED_FUNCTION(dumpCineonGenericHeader)(CineonGenericHeader* header) {
        dumpCineonFileInfo(&header->fileInfo);
        dumpCineonImageInfo(&header->imageInfo);
        dumpCineonFormatInfo(&header->formatInfo);
index f05c19c4f47373e9e426f8114bafee7a3db4c228..cbc7cb9d64a8cb146ec70d90e2fa5ef2808980dd 100644 (file)
@@ -38,8 +38,12 @@ extern "C" {
 #endif
 
 #include "BLO_sys_types.h" // for intptr_t support
+
+#ifdef _MSC_VER
 #undef ntohl
 #undef htonl
+#endif
+
 typedef int (GetRowFn)(LogImageFile* logImage, unsigned short* row, int lineNum);
 typedef int (SetRowFn)(LogImageFile* logImage, const unsigned short* row, int lineNum);
 typedef void (CloseFn)(LogImageFile* logImage);
index 5eccba16c3d4f19cfcdcd4fd096ce04ba3d328da..3d0e177c94e713acd3d383bed59bebd18d6e5a6e 100644 (file)
@@ -323,30 +323,6 @@ static void rna_Actuator_constraint_detect_material_set(struct PointerRNA *ptr,
        }
 }
 
-static void rna_FcurveActuator_add_set(struct PointerRNA *ptr, int value)
-{
-       bActuator *act = (bActuator *)ptr->data;
-       bIpoActuator *ia = act->data;
-
-       if(value == 1){
-               ia->flag &= ~ACT_IPOFORCE;
-               ia->flag |= ACT_IPOADD;
-       }else
-               ia->flag &= ~ACT_IPOADD;
-}
-
-static void rna_FcurveActuator_force_set(struct PointerRNA *ptr, int value)
-{
-       bActuator *act = (bActuator *)ptr->data;
-       bIpoActuator *ia = act->data;
-
-       if(value == 1){
-               ia->flag &= ~ACT_IPOADD;
-               ia->flag |= ACT_IPOFORCE;
-       }else
-               ia->flag &= ~ACT_IPOFORCE;
-}
-
 static void rna_ActionActuator_add_set(struct PointerRNA *ptr, int value)
 {
        bActuator *act = (bActuator *)ptr->data;
@@ -858,77 +834,6 @@ static void rna_def_object_actuator(BlenderRNA *brna)
        RNA_def_property_update(prop, NC_LOGIC, NULL);
 }
 
-/* The fcurve actuator has been replace with the action actuator, so this is no longer used */
-static void rna_def_fcurve_actuator(BlenderRNA *brna)
-{
-       StructRNA *srna;
-       PropertyRNA *prop;
-
-       static EnumPropertyItem prop_type_items[] ={
-               {ACT_IPO_PLAY, "PLAY", 0, "Play", ""},
-               {ACT_IPO_PINGPONG, "PINGPONG", 0, "Ping Pong", ""},
-               {ACT_IPO_FLIPPER, "FLIPPER", 0, "Flipper", ""},
-               {ACT_IPO_LOOP_STOP, "STOP", 0, "Loop Stop", ""},
-               {ACT_IPO_LOOP_END, "END", 0, "Loop End", ""},
-//             {ACT_IPO_KEY2KEY, "IPOCHILD", 0, "Key to Key", ""},
-               {ACT_IPO_FROM_PROP, "PROP", 0, "Property", ""},
-               {0, NULL, 0, NULL, NULL}};
-       
-       srna= RNA_def_struct(brna, "FCurveActuator", "Actuator");
-       RNA_def_struct_ui_text(srna, "F-Curve Actuator", "Actuator to animate the object");
-       RNA_def_struct_sdna_from(srna, "bIpoActuator", "data");
-
-       prop= RNA_def_property(srna, "play_type", PROP_ENUM, PROP_NONE);
-       RNA_def_property_enum_sdna(prop, NULL, "type");
-       RNA_def_property_enum_items(prop, prop_type_items);
-       RNA_def_property_ui_text(prop, "F-Curve Type", "Specify the way you want to play the animation");
-       RNA_def_property_update(prop, NC_LOGIC, NULL);
-       
-       prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "sta");
-       RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2);
-       RNA_def_property_ui_text(prop, "Start Frame", "");
-       RNA_def_property_update(prop, NC_SCENE, NULL);
-
-       prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "end");
-       RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2);
-       RNA_def_property_ui_text(prop, "End Frame", "");
-       RNA_def_property_update(prop, NC_LOGIC, NULL);
-       
-       prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
-       RNA_def_property_string_sdna(prop, NULL, "name");
-       RNA_def_property_ui_text(prop, "Property", "Use this property to define the F-Curve position");
-       RNA_def_property_update(prop, NC_LOGIC, NULL);
-
-       prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
-       RNA_def_property_string_sdna(prop, NULL, "frameProp");
-       RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property");
-
-       /* booleans */
-       prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOADD);
-       RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_add_set");
-       RNA_def_property_ui_text(prop, "Add", "F-Curve is added to the current loc/rot/scale in global or local coordinate according to Local flag");
-       RNA_def_property_update(prop, NC_LOGIC, NULL);
-
-       prop= RNA_def_property(srna, "use_force", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOFORCE);
-       RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_force_set");
-       RNA_def_property_ui_text(prop, "Force", "Apply F-Curve as a global or local force depending on the local option (dynamic objects only)");
-       RNA_def_property_update(prop, NC_LOGIC, NULL);
-       
-       prop= RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOLOCAL);
-       RNA_def_property_ui_text(prop, "L", "Let the F-Curve act in local coordinates, used in Force and Add mode");
-       RNA_def_property_update(prop, NC_LOGIC, NULL);
-
-       prop= RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOCHILD);
-       RNA_def_property_ui_text(prop, "Child", "Update F-Curve on all children Objects as well");
-       RNA_def_property_update(prop, NC_LOGIC, NULL);
-}
-
 static void rna_def_camera_actuator(BlenderRNA *brna)
 {
        StructRNA *srna;
index ba91fc3536ba374ac4b5067c02b235fb20713e48..77fa975761ff29c806b879f64c81281a79c5d4d7 100644 (file)
 #include "WM_types.h"
 #include "WM_api.h"
 
-static EnumPropertyItem part_from_items[] = {
+EnumPropertyItem part_from_items[] = {
        {PART_FROM_VERT, "VERT", 0, "Verts", ""},
        {PART_FROM_FACE, "FACE", 0, "Faces", ""},
        {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-static EnumPropertyItem part_reactor_from_items[] = {
+EnumPropertyItem part_reactor_from_items[] = {
        {PART_FROM_VERT, "VERT", 0, "Verts", ""},
        {PART_FROM_FACE, "FACE", 0, "Faces", ""},
        {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-static EnumPropertyItem part_dist_items[] = {
+EnumPropertyItem part_dist_items[] = {
        {PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
        {PART_DISTR_RAND, "RAND", 0, "Random", ""},
        {PART_DISTR_GRID, "GRID", 0, "Grid", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-static EnumPropertyItem part_hair_dist_items[] = {
+EnumPropertyItem part_hair_dist_items[] = {
        {PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
        {PART_DISTR_RAND, "RAND", 0, "Random", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-static EnumPropertyItem part_draw_as_items[] = {
+EnumPropertyItem part_draw_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
        {PART_DRAW_DOT, "DOT", 0, "Point", ""},
@@ -88,14 +88,14 @@ static EnumPropertyItem part_draw_as_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-static EnumPropertyItem part_hair_draw_as_items[] = {
+EnumPropertyItem part_hair_draw_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
        {PART_DRAW_PATH, "PATH", 0, "Path", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-static EnumPropertyItem part_ren_as_items[] = {
+EnumPropertyItem part_ren_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_HALO, "HALO", 0, "Halo", ""},
        {PART_DRAW_LINE, "LINE", 0, "Line", ""},
@@ -106,7 +106,7 @@ static EnumPropertyItem part_ren_as_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-static EnumPropertyItem part_hair_ren_as_items[] = {
+EnumPropertyItem part_hair_ren_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_PATH, "PATH", 0, "Path", ""},
        {PART_DRAW_OB, "OBJECT", 0, "Object", ""},
index a1ce77b061d528024bfce98c6d4bb4ef250928bc..503212201c41e2ddd3b40101687386e23d2b2569 100644 (file)
@@ -48,7 +48,7 @@
 
 #include "BKE_node.h"
 
-static EnumPropertyItem texture_filter_items[] = {
+EnumPropertyItem texture_filter_items[] = {
        {TXF_BOX, "BOX", 0, "Box", ""},
        {TXF_EWA, "EWA", 0, "EWA", ""},
        {TXF_FELINE, "FELINE", 0, "FELINE", ""},
index 04683a5f99b2498f3847554c716d92be31b97900..448fb307d2d5064891f5ee8c09a627f93e6d6e1b 100644 (file)
@@ -95,7 +95,6 @@ if(WITH_CODEC_FFMPEG)
                ${PTHREADS_INCLUDE_DIRS}
        )
        add_definitions(-DWITH_FFMPEG)
-       add_definitions(-D__STDC_CONSTANT_MACROS)
 endif()
 
 blender_add_lib(ge_videotex "${SRC}" "${INC}" "${INC_SYS}")