diff options
-rw-r--r-- | CMakeLists.txt | 20 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/implicit.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/multires.c | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 15 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/shrinkwrap.c | 7 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 1 |
8 files changed, 36 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bd99fe00539..27250d38f94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -317,19 +317,19 @@ IF(UNIX AND NOT APPLE) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") ENDIF(WITH_OPENMP) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") - - SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") - SET(PLATFORM_LINKFLAGS "-pthread") - # Better warnings - # note: -Wunused-parameter is added below for all GCC compilers - SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") - SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") - INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ) + IF(CMAKE_COMPILER_IS_GNUCC) + SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") + + # Better warnings + # note: -Wunused-parameter is added below for all GCC compilers + SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") + SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") + ENDIF(CMAKE_COMPILER_IS_GNUCC) ENDIF(UNIX AND NOT APPLE) diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 9b2c1805069..d2b437d9833 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -32,7 +32,6 @@ #ifndef _WIN32 #include <unistd.h> // for read close - #include <sys/param.h> // for MAXPATHLEN #else #include <io.h> // for open close read #define open _open diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 6ca95752887..bdf71a8c6f0 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1562,13 +1562,15 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec unsigned int i = 0; float spring_air = clmd->sim_parms->Cvi * 0.01f; /* viscosity of air scaled in percent */ float gravity[3] = {0.0f, 0.0f, 0.0f}; - float tm2[3][3] = {{-spring_air,0,0}, {0,-spring_air,0},{0,0,-spring_air}}; + float tm2[3][3] = {{0}}; MFace *mfaces = cloth->mfaces; unsigned int numverts = cloth->numverts; LinkNode *search = cloth->springs; lfVector *winvec; EffectedPoint epoint; + tm2[0][0]= tm2[1][1]= tm2[2][2]= -spring_air; + /* global acceleration (gravitation) */ if(clmd->scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) { VECCOPY(gravity, clmd->scene->physics_settings.gravity); diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 23a81e53728..329ef377c52 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -1073,7 +1073,12 @@ static void create_old_vert_edge_map(ListBase **map, IndexNode **mem, const Mult static MultiresFace *find_old_face(ListBase *map, MultiresFace *faces, int v1, int v2, int v3, int v4) { IndexNode *n1; - int v[4] = {v1, v2, v3, v4}, i, j; + int v[4], i, j; + + v[0]= v1; + v[1]= v2; + v[2]= v3; + v[3]= v4; for(n1 = map[v1].first; n1; n1 = n1->next) { int fnd[4] = {0, 0, 0, 0}; diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 65b898a2807..0dc0b67b377 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -4454,7 +4454,11 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3] void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys) { - ParticleSimulationData sim = {scene, ob, psys, psys_get_modifier(ob, psys)}; + ParticleSimulationData sim= {0}; + sim.scene= scene; + sim.ob= ob; + sim.psys= psys; + sim.psmd= psys_get_modifier(ob, psys); psys->lattice = psys_get_lattice(&sim); diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 504105d5950..2b045647661 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1705,9 +1705,10 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime, r_phase = PSYS_FRAND(p + 20); if(part->from==PART_FROM_PARTICLE){ - ParticleSimulationData tsim = {sim->scene, psys->target_ob ? psys->target_ob : ob, NULL, NULL}; float speed; - + ParticleSimulationData tsim= {0}; + tsim.scene= sim->scene; + tsim.ob= psys->target_ob ? psys->target_ob : ob; tsim.psys = BLI_findlink(&tsim.ob->particlesystem, sim->psys->target_psys-1); state.time = pa->time; @@ -2057,12 +2058,14 @@ void psys_count_keyed_targets(ParticleSimulationData *sim) static void set_keyed_keys(ParticleSimulationData *sim) { ParticleSystem *psys = sim->psys; - ParticleSimulationData ksim = {sim->scene, NULL, NULL, NULL}; + ParticleSimulationData ksim= {0}; ParticleTarget *pt; PARTICLE_P; ParticleKey *key; int totpart = psys->totpart, k, totkeys = psys->totkeyed; + ksim.scene= sim->scene; + /* no proper targets so let's clear and bail out */ if(psys->totkeyed==0) { free_keyed_keys(psys); @@ -3989,7 +3992,7 @@ static int hair_needs_recalc(ParticleSystem *psys) * then advances in to actual particle calculations depending on particle type */ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys) { - ParticleSimulationData sim = {scene, ob, psys, NULL, NULL}; + ParticleSimulationData sim= {0}; ParticleSettings *part = psys->part; float cfra; @@ -4000,6 +4003,10 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys) return; cfra= BKE_curframe(scene); + + sim.scene= scene; + sim.ob= ob; + sim.psys= psys; sim.psmd= psys_get_modifier(ob, psys); /* system was already updated from modifier stack */ diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index a6daaf36ff6..936fb1bfeab 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -49,14 +49,9 @@ #include "BKE_subsurf.h" #include "BLI_math.h" -#include "BLI_editVert.h" - /* Util macros */ -#define TO_STR(a) #a -#define JOIN(a,b) a##b - #define OUT_OF_MEMORY() ((void)printf("Shrinkwrap: Out of memory\n")) /* Benchmark macros */ @@ -90,7 +85,7 @@ typedef void ( *Shrinkwrap_ForeachVertexCallback) (DerivedMesh *target, float *c DerivedMesh *object_get_derived_final(struct Scene *scene, Object *ob, CustomDataMask dataMask) { Mesh *me= ob->data; - EditMesh *em = BKE_mesh_get_editmesh(me); + struct EditMesh *em = BKE_mesh_get_editmesh(me); if (em) { diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 7861eb08ea4..e05f6f57727 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -39,7 +39,6 @@ #ifndef WIN32 #include <unistd.h> // for read close - #include <sys/param.h> // for MAXPATHLEN #else #include <io.h> // for open close read #include "winsock2.h" |