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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-17 03:51:42 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-17 03:51:42 +0300
commit9bcdb4b758d96d1fe5345858f6c61a90f7c57eac (patch)
tree51d1be5c5d7243b9782a10e8ed99a153f5392ef7 /source/blender/blenlib/intern
parentde9495e51915cae71ecdae05fdc21e5aef09ba4e (diff)
2.5: various warning fixes.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c2
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c9
-rw-r--r--source/blender/blenlib/intern/arithb.c6
-rw-r--r--source/blender/blenlib/intern/fnmatch.c5
-rw-r--r--source/blender/blenlib/intern/graph.c2
-rw-r--r--source/blender/blenlib/intern/listbase.c2
-rw-r--r--source/blender/blenlib/intern/winstuff.c5
7 files changed, 14 insertions, 17 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index 1967b8a88e2..80cd507520c 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -253,7 +253,7 @@ int BLI_ghashIterator_isDone(GHashIterator *ghi) {
/***/
unsigned int BLI_ghashutil_ptrhash(void *key) {
- return (unsigned int) key;
+ return (unsigned int)(intptr_t)key;
}
int BLI_ghashutil_ptrcmp(void *a, void *b) {
if (a==b)
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 30472beb3e6..0f8194362c9 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -478,6 +478,7 @@ static void node_join(BVHTree *tree, BVHNode *node)
/*
* Debug and information functions
*/
+#if 0
static void bvhtree_print_tree(BVHTree *tree, BVHNode *node, int depth)
{
int i;
@@ -509,6 +510,7 @@ static void bvhtree_info(BVHTree *tree)
// bvhtree_print_tree(tree, tree->nodes[tree->totleaf], 0);
}
+#endif
#if 0
@@ -1238,7 +1240,7 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node)
int i;
float nearest[3];
- if(data->proj[ node->main_axis ] <= node->children[0]->bv[node->main_axis*2+1])
+ if(data->proj[ (int)node->main_axis ] <= node->children[0]->bv[(int)node->main_axis*2+1])
{
for(i=0; i != node->totnode; i++)
@@ -1267,6 +1269,7 @@ static void dfs_find_nearest_begin(BVHNearestData *data, BVHNode *node)
}
+#if 0
static void NodeDistance_push_heap(NodeDistance *heap, int heap_size)
PUSH_HEAP_BODY(NodeDistance, NodeDistance_priority, heap, heap_size)
@@ -1350,7 +1353,7 @@ static void bfs_find_nearest(BVHNearestData *data, BVHNode *node)
if(heap != default_heap)
free(heap);
}
-
+#endif
int BLI_bvhtree_find_nearest(BVHTree *tree, const float *co, BVHTreeNearest *nearest, BVHTree_NearestPointCallback callback, void *userdata)
{
@@ -1463,7 +1466,7 @@ static void dfs_raycast(BVHRayCastData *data, BVHNode *node)
else
{
//pick loop direction to dive into the tree (based on ray direction and split axis)
- if(data->ray_dot_axis[ node->main_axis ] > 0.0f)
+ if(data->ray_dot_axis[ (int)node->main_axis ] > 0.0f)
{
for(i=0; i != node->totnode; i++)
{
diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c
index 4d555a009c5..a21252d9aa8 100644
--- a/source/blender/blenlib/intern/arithb.c
+++ b/source/blender/blenlib/intern/arithb.c
@@ -4263,6 +4263,7 @@ float lambda_cp_line_ex(float p[3], float l1[3], float l2[3], float cp[3])
return lambda;
}
+#if 0
/* little sister we only need to know lambda */
static float lambda_cp_line(float p[3], float l1[3], float l2[3])
{
@@ -4271,6 +4272,7 @@ static float lambda_cp_line(float p[3], float l1[3], float l2[3])
VecSubf(h, p, l1);
return(Inpf(u,h)/Inpf(u,u));
}
+#endif
/* Similar to LineIntersectsTriangleUV, except it operates on a quad and in 2d, assumes point is in quad */
void PointInQuad2DUV(float v0[2], float v1[2], float v2[2], float v3[2], float pt[2], float *uv)
@@ -4423,7 +4425,7 @@ int IsPointInTri2D(float v0[2], float v1[2], float v2[2], float pt[2])
Vec2Copyf(v2_3d, v2);
/* Doing this in 3D is not nice */
- return LineIntersectsTriangle(p1_3d, p2_3d, v0_3d, v1_3d, v2_3d, &lambda, &uv);
+ return LineIntersectsTriangle(p1_3d, p2_3d, v0_3d, v1_3d, v2_3d, &lambda, uv);
}
/*
@@ -4505,6 +4507,7 @@ but see a 'spat' which is a deformed cube with paired parallel planes needs only
return 1;
}
+#if 0
/*adult sister defining the slice planes by the origin and the normal
NOTE |normal| may not be 1 but defining the thickness of the slice*/
static int point_in_slice_as(float p[3],float origin[3],float normal[3])
@@ -4525,6 +4528,7 @@ static int point_in_slice_m(float p[3],float origin[3],float normal[3],float lns
if (h < 0.0f || h > 1.0f) return 0;
return 1;
}
+#endif
int point_in_tri_prism(float p[3], float v1[3], float v2[3], float v3[3])
diff --git a/source/blender/blenlib/intern/fnmatch.c b/source/blender/blenlib/intern/fnmatch.c
index 54114ad3448..32065283bd0 100644
--- a/source/blender/blenlib/intern/fnmatch.c
+++ b/source/blender/blenlib/intern/fnmatch.c
@@ -240,10 +240,7 @@ fnmatch (const char *pattern, const char *string, int flags)
#else
-static void BLI_FNMATCH_C_IS_EMPTY_FOR_UNIX(void)
-{
- /*intentionally empty*/
-}
+/* intentionally empty for UNIX */
#endif /* WIN32 */
diff --git a/source/blender/blenlib/intern/graph.c b/source/blender/blenlib/intern/graph.c
index 8f35b38379e..03a565ef0bf 100644
--- a/source/blender/blenlib/intern/graph.c
+++ b/source/blender/blenlib/intern/graph.c
@@ -465,8 +465,6 @@ int subtreeShape(BNode *node, BArc *rootArc, int include_root)
int BLI_subtreeShape(BGraph *graph, BNode *node, BArc *rootArc, int include_root)
{
- BNode *test_node;
-
BLI_flagNodes(graph, 0);
return subtreeShape(node, rootArc, include_root);
}
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c
index 774e72091c0..e0fd5c37494 100644
--- a/source/blender/blenlib/intern/listbase.c
+++ b/source/blender/blenlib/intern/listbase.c
@@ -43,8 +43,6 @@
#include "BLI_listbase.h"
-static int add_win32_extension(char *name);
-
/* implementation */
/* Ripped this from blender.c */
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 666a54b54cc..2f96f7b6af1 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -219,9 +219,6 @@ int check_file_chars(char *filename)
#else
-static void BLI_WINSTUFF_C_IS_EMPTY_FOR_UNIX(void)
-{
- /*intentionally empty*/
-}
+/* intentionally empty for UNIX */
#endif