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:
authorJean-Luc Peurière <jlp@nerim.net>2005-03-09 22:45:59 +0300
committerJean-Luc Peurière <jlp@nerim.net>2005-03-09 22:45:59 +0300
commitc78e44cdc563853c250da78ee78ba622c39126b2 (patch)
treefb116af7e1edd94ef96ae883bea727be372e2bd2 /source/blender/blenlib
parent77d44e88e95d86661fc8b29db923083ec747cf9d (diff)
big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_gsqueue.h2
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c2
-rw-r--r--source/blender/blenlib/intern/arithb.c1
-rw-r--r--source/blender/blenlib/intern/dynlib.c8
-rw-r--r--source/blender/blenlib/intern/fileops.c1
-rw-r--r--source/blender/blenlib/intern/noise.c54
-rw-r--r--source/blender/blenlib/intern/psfont.c2
-rw-r--r--source/blender/blenlib/intern/storage.c2
-rw-r--r--source/blender/blenlib/intern/winstuff.c2
9 files changed, 40 insertions, 34 deletions
diff --git a/source/blender/blenlib/BLI_gsqueue.h b/source/blender/blenlib/BLI_gsqueue.h
index 3079c5e1f56..5180d3d8bbc 100644
--- a/source/blender/blenlib/BLI_gsqueue.h
+++ b/source/blender/blenlib/BLI_gsqueue.h
@@ -85,7 +85,7 @@ void BLI_gsqueue_push (GSQueue *gq, void *item);
* @param item A pointer to an appropriatly
* sized structure (the size passed to BLI_gsqueue_new).
*/
-void BLI_qsueue_pushback (GSQueue *gq, void *item);
+void BLI_gsqueue_pushback (GSQueue *gq, void *item);
/**
* Free the queue
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index e523cdcdea9..23e21d4fb45 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -228,7 +228,7 @@ unsigned int BLI_ghashutil_strhash(void *ptr) {
unsigned int i= 0;
unsigned char c;
- while (c= *s++)
+ while ( (c= *s++) )
i= i*37 + c;
return i;
diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c
index 95e07dda0c8..38a6cf2df6c 100644
--- a/source/blender/blenlib/intern/arithb.c
+++ b/source/blender/blenlib/intern/arithb.c
@@ -1399,6 +1399,7 @@ void VecUpMat3(float *vec, float mat[][3], short axis)
}
/* A & M Watt, Advanced animation and rendering techniques, 1992 ACM press */
+void QuatInterpolW(float *, float *, float *, float );
void QuatInterpolW(float *result, float *quat1, float *quat2, float t)
{
diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.c
index d2e8f80757b..4368f5d1cee 100644
--- a/source/blender/blenlib/intern/dynlib.c
+++ b/source/blender/blenlib/intern/dynlib.c
@@ -31,7 +31,11 @@
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+
#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
#include "../PIL_dynlib.h"
#ifdef HAVE_CONFIG_H
@@ -117,7 +121,7 @@ struct PILdynlib {
void *handle;
};
-char *osxerror(int setget, const char *str, ...)
+static char *osxerror(int setget, const char *str, ...)
{
static char errstr[ERR_STR_LEN];
static int err_filled = 0;
@@ -154,7 +158,7 @@ char *osxerror(int setget, const char *str, ...)
return retval;
}
-void *osxdlopen(const char *path, int mode)
+static void *osxdlopen(const char *path, int mode)
{
void *module = 0;
NSObjectFileImage ofi = 0;
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index a743e552407..69e8790c894 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -38,6 +38,7 @@
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index ef651e0c374..1eaff59bf7b 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -210,7 +210,7 @@ float hashvectf[768]= {
#define lerp(t, a, b) ((a)+(t)*((b)-(a)))
#define npfade(t) ((t)*(t)*(t)*((t)*((t)*6-15)+10))
-float grad(int hash, float x, float y, float z)
+static float grad(int hash, float x, float y, float z)
{
int h = hash & 15; // CONVERT LO 4 BITS OF HASH CODE
float u = h<8 ? x : y, // INTO 12 GRADIENT DIRECTIONS.
@@ -219,7 +219,7 @@ float grad(int hash, float x, float y, float z)
}
/* instead of adding another permutation array, just use hash table defined above */
-float newPerlin(float x, float y, float z)
+static float newPerlin(float x, float y, float z)
{
int A, AA, AB, B, BA, BB;
float u=floor(x), v=floor(y), w=floor(z);
@@ -243,7 +243,7 @@ float newPerlin(float x, float y, float z)
}
/* for use with BLI_gNoise()/BLI_gTurbulence(), returns unsigned improved perlin noise */
-float newPerlinU(float x, float y, float z)
+static float newPerlinU(float x, float y, float z)
{
return (0.5+0.5*newPerlin(x, y, z));
}
@@ -254,7 +254,7 @@ float newPerlinU(float x, float y, float z)
/**************************/
/* Was BLI_hnoise(), removed noisesize, so other functions can call it without scaling. */
-float orgBlenderNoise(float x, float y, float z)
+static float orgBlenderNoise(float x, float y, float z)
{
register float cn1, cn2, cn3, cn4, cn5, cn6, i, *h;
float ox, oy, oz, jx, jy, jz;
@@ -324,7 +324,7 @@ float orgBlenderNoise(float x, float y, float z)
}
/* as orgBlenderNoise(), returning signed noise */
-float orgBlenderNoiseS(float x, float y, float z)
+static float orgBlenderNoiseS(float x, float y, float z)
{
return (2.0*orgBlenderNoise(x, y, z)-1.0);
}
@@ -532,7 +532,7 @@ float turbulence_perlin(float *point, float lofreq, float hifreq)
}
/* for use with BLI_gNoise/gTurbulence, returns signed noise */
-float orgPerlinNoise(float x, float y, float z)
+static float orgPerlinNoise(float x, float y, float z)
{
float v[3];
@@ -543,7 +543,7 @@ float orgPerlinNoise(float x, float y, float z)
}
/* for use with BLI_gNoise/gTurbulence, returns unsigned noise */
-float orgPerlinNoiseU(float x, float y, float z)
+static float orgPerlinNoiseU(float x, float y, float z)
{
float v[3];
@@ -585,13 +585,13 @@ float turbulencep(float noisesize, float x, float y, float z, int nr)
/* Camberra omitted, didn't seem useful */
/* distance squared */
-float dist_Squared(float x, float y, float z, float e) { return (x*x + y*y + z*z); }
+static float dist_Squared(float x, float y, float z, float e) { return (x*x + y*y + z*z); }
/* real distance */
-float dist_Real(float x, float y, float z, float e) { return sqrt(x*x + y*y + z*z); }
+static float dist_Real(float x, float y, float z, float e) { return sqrt(x*x + y*y + z*z); }
/* manhattan/taxicab/cityblock distance */
-float dist_Manhattan(float x, float y, float z, float e) { return (fabs(x) + fabs(y) + fabs(z)); }
+static float dist_Manhattan(float x, float y, float z, float e) { return (fabs(x) + fabs(y) + fabs(z)); }
/* Chebychev */
-float dist_Chebychev(float x, float y, float z, float e)
+static float dist_Chebychev(float x, float y, float z, float e)
{
float t;
x = fabs(x);
@@ -602,14 +602,14 @@ float dist_Chebychev(float x, float y, float z, float e)
}
/* minkovsky preset exponent 0.5 */
-float dist_MinkovskyH(float x, float y, float z, float e)
+static float dist_MinkovskyH(float x, float y, float z, float e)
{
float d = sqrt(fabs(x)) + sqrt(fabs(y)) + sqrt(fabs(z));
return (d*d);
}
/* minkovsky preset exponent 4 */
-float dist_Minkovsky4(float x, float y, float z, float e)
+static float dist_Minkovsky4(float x, float y, float z, float e)
{
x *= x;
y *= y;
@@ -618,7 +618,7 @@ float dist_Minkovsky4(float x, float y, float z, float e)
}
/* Minkovsky, general case, slow, maybe too slow to be useful */
-float dist_Minkovsky(float x, float y, float z, float e)
+static float dist_Minkovsky(float x, float y, float z, float e)
{
return pow(pow(fabs(x), e) + pow(fabs(y), e) + pow(fabs(z), e), 1.0/e);
}
@@ -696,35 +696,35 @@ void voronoi(float x, float y, float z, float* da, float* pa, float me, int dtyp
}
/* returns different feature points for use in BLI_gNoise() */
-float voronoi_F1(float x, float y, float z)
+static float voronoi_F1(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
return da[0];
}
-float voronoi_F2(float x, float y, float z)
+static float voronoi_F2(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
return da[1];
}
-float voronoi_F3(float x, float y, float z)
+static float voronoi_F3(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
return da[2];
}
-float voronoi_F4(float x, float y, float z)
+static float voronoi_F4(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
return da[3];
}
-float voronoi_F1F2(float x, float y, float z)
+static float voronoi_F1F2(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
@@ -732,7 +732,7 @@ float voronoi_F1F2(float x, float y, float z)
}
/* Crackle type pattern, just a scale/clamp of F2-F1 */
-float voronoi_Cr(float x, float y, float z)
+static float voronoi_Cr(float x, float y, float z)
{
float t = 10*voronoi_F1F2(x, y, z);
if (t>1.f) return 1.f;
@@ -742,35 +742,35 @@ float voronoi_Cr(float x, float y, float z)
/* Signed version of all 6 of the above, just 2x-1, not really correct though (range is potentially (0, sqrt(6)).
Used in the musgrave functions */
-float voronoi_F1S(float x, float y, float z)
+static float voronoi_F1S(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
return (2.0*da[0]-1.0);
}
-float voronoi_F2S(float x, float y, float z)
+static float voronoi_F2S(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
return (2.0*da[1]-1.0);
}
-float voronoi_F3S(float x, float y, float z)
+static float voronoi_F3S(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
return (2.0*da[2]-1.0);
}
-float voronoi_F4S(float x, float y, float z)
+static float voronoi_F4S(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
return (2.0*da[3]-1.0);
}
-float voronoi_F1F2S(float x, float y, float z)
+static float voronoi_F1F2S(float x, float y, float z)
{
float da[4], pa[12];
voronoi(x, y, z, da, pa, 1, 0);
@@ -778,7 +778,7 @@ float voronoi_F1F2S(float x, float y, float z)
}
/* Crackle type pattern, just a scale/clamp of F2-F1 */
-float voronoi_CrS(float x, float y, float z)
+static float voronoi_CrS(float x, float y, float z)
{
float t = 10*voronoi_F1F2(x, y, z);
if (t>1.f) return 1.f;
@@ -795,7 +795,7 @@ float voronoi_CrS(float x, float y, float z)
/*************/
/* returns unsigned cellnoise */
-float cellNoiseU(float x, float y, float z)
+static float cellNoiseU(float x, float y, float z)
{
int xi = (int)(floor(x));
int yi = (int)(floor(y));
diff --git a/source/blender/blenlib/intern/psfont.c b/source/blender/blenlib/intern/psfont.c
index cd602eeb431..8b0f566ec2a 100644
--- a/source/blender/blenlib/intern/psfont.c
+++ b/source/blender/blenlib/intern/psfont.c
@@ -871,7 +871,7 @@ static int decodetype1(PackedFile * pf, char *outname)
datbytes = pf->size - pf->seek;
memcpy(bindat, ((char *) pf->data) + pf->seek, datbytes);
- if ((bindat[2] << 8 + bindat[3]) == 0x800){
+ if ((bindat[2] << (8 + bindat[3])) == 0x800){
/* order data (remove 6 bytes headers) */
i = datbytes;
hptr = bptr = bindat + 4;
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 07f245982f7..bed2383d751 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -236,7 +236,7 @@ void BLI_builddir(char *dirname, char *relname)
return;
}
- if (dir = (DIR *)opendir(".")){
+ if ( (dir = (DIR *)opendir(".")) ){
while ((fname = (struct dirent*) readdir(dir)) != NULL) {
if(hide_dot && fname->d_name[0]=='.' && fname->d_name[1]!='.' && fname->d_name[1]!=0);
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 64a56b9a306..22c0e2c71ca 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -208,7 +208,7 @@ int closedir (DIR *dp) {
#else
-void BLI_WINSTUFF_C_IS_EMPTY_FOR_UNIX(void)
+static void BLI_WINSTUFF_C_IS_EMPTY_FOR_UNIX(void)
{
/*intentionally empty*/
}