diff options
author | Ton Roosendaal <ton@blender.org> | 2008-09-20 16:26:18 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-09-20 16:26:18 +0400 |
commit | 9b9edad6b6fb4db3f393ef408921f8411b588814 (patch) | |
tree | b91286f79f9ccb05472029f6e94bbeee6c7b10fb | |
parent | 3dbdd8939b418d39f42b6cc0b4fab38083b393cd (diff) |
Patch 17403, small gcc warning fixes.
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/edgehash.c | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 328dcada01a..5bc70e00891 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -3339,7 +3339,7 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs, void writeBobjgz(char *filename, struct Object *ob, int useGlobalCoords, int append, float time) { char debugStrBuffer[256]; - int wri,i,j,totvert,totface; + int wri=0,i,j,totvert,totface; float wrf; gzFile gzf; DerivedMesh *dm; diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c index 3e1c8afb7a8..603c85655d7 100644 --- a/source/blender/blenlib/intern/edgehash.c +++ b/source/blender/blenlib/intern/edgehash.c @@ -77,8 +77,12 @@ void BLI_edgehash_insert(EdgeHash *eh, int v0, int v1, void *val) { unsigned int hash; Entry *e= malloc(sizeof(*e)); - if (v1<v0) v0 ^= v1 ^= v0 ^= v1; - hash = EDGEHASH(v0,v1)%eh->nbuckets; + if (v1<v0) { + v0 ^= v1; + v1 ^= v0; + v0 ^= v1; + } + hash = EDGEHASH(v0,v1)%eh->nbuckets; e->v0 = v0; e->v1 = v1; @@ -114,7 +118,11 @@ void** BLI_edgehash_lookup_p(EdgeHash *eh, int v0, int v1) { unsigned int hash; Entry *e; - if (v1<v0) v0 ^= v1 ^= v0 ^= v1; + if (v1<v0) { + v0 ^= v1; + v1 ^= v0; + v0 ^= v1; + } hash = EDGEHASH(v0,v1)%eh->nbuckets; for (e= eh->buckets[hash]; e; e= e->next) if (v0==e->v0 && v1==e->v1) |