From d724d0adfe10db8042f0d4d2a971e73b0bcec902 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 16 Sep 2012 00:26:36 +0000 Subject: code cleanup: quiet warnings for gcc's -Wundef, -Wmissing-declarations --- intern/audaspace/OpenAL/AUD_OpenALDevice.cpp | 4 ++-- intern/cycles/blender/blender_python.cpp | 2 +- intern/dualcon/intern/Projections.cpp | 4 ++-- intern/dualcon/intern/dualcon_c_api.cpp | 2 +- intern/dualcon/intern/octree.cpp | 12 +++++++----- intern/raskter/raskter.c | 3 ++- intern/smoke/intern/smoke_API.cpp | 5 ++++- 7 files changed, 19 insertions(+), 13 deletions(-) (limited to 'intern') diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp index c3f3f46d188..f68d41f6a1c 100644 --- a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp +++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp @@ -767,7 +767,7 @@ bool AUD_OpenALDevice::AUD_OpenALHandle::setConeVolumeOuter(float volume) /**************************** Threading Code **********************************/ /******************************************************************************/ -void* AUD_openalRunThread(void* device) +static void *AUD_openalRunThread(void *device) { AUD_OpenALDevice* dev = (AUD_OpenALDevice*)device; dev->updateStreams(); @@ -993,7 +993,7 @@ AUD_OpenALDevice::AUD_OpenALDevice(AUD_DeviceSpecs specs, int buffersize) AUD_THROW(AUD_ERROR_OPENAL, open_error); // at least try to set the frequency - ALCint attribs[] = { ALC_FREQUENCY, specs.rate, 0 }; + ALCint attribs[] = { ALC_FREQUENCY, (ALCint)specs.rate, 0 }; ALCint* attributes = attribs; if(specs.rate == AUD_RATE_INVALID) attributes = NULL; diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp index 96d5bb61ff8..d9220b76835 100644 --- a/intern/cycles/blender/blender_python.cpp +++ b/intern/cycles/blender/blender_python.cpp @@ -183,7 +183,7 @@ static struct PyModuleDef module = { NULL, NULL, NULL, NULL }; -CCLDeviceInfo *compute_device_list(DeviceType type) +static CCLDeviceInfo *compute_device_list(DeviceType type) { /* device list stored static */ static ccl::vector device_list; diff --git a/intern/dualcon/intern/Projections.cpp b/intern/dualcon/intern/Projections.cpp index 2a52cc9972a..f00d998591f 100644 --- a/intern/dualcon/intern/Projections.cpp +++ b/intern/dualcon/intern/Projections.cpp @@ -92,12 +92,12 @@ static void crossProduct(double res[3], const double a[3], const double b[3]) /** * Method to perform dot product */ -int64_t dotProduct(const int64_t a[3], const int64_t b[3]) +static int64_t dotProduct(const int64_t a[3], const int64_t b[3]) { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; } -void normalize(double a[3]) +static void normalize(double a[3]) { double mag = a[0] * a[0] + a[1] * a[1] + a[2] * a[2]; if (mag > 0) { diff --git a/intern/dualcon/intern/dualcon_c_api.cpp b/intern/dualcon/intern/dualcon_c_api.cpp index 894ab6b0873..c96415bfb54 100644 --- a/intern/dualcon/intern/dualcon_c_api.cpp +++ b/intern/dualcon/intern/dualcon_c_api.cpp @@ -32,7 +32,7 @@ #define isnan(n) _isnan(n) #endif -void veccopy(float dst[3], const float src[3]) +static void veccopy(float dst[3], const float src[3]) { dst[0] = src[0]; dst[1] = src[1]; diff --git a/intern/dualcon/intern/octree.cpp b/intern/dualcon/intern/octree.cpp index 9f44e7bbfdf..c74f8bf2f46 100644 --- a/intern/dualcon/intern/octree.cpp +++ b/intern/dualcon/intern/octree.cpp @@ -345,11 +345,13 @@ void Octree::addTriangle(Triangle *trian, int triind) delete proj; } -void print_depth(int height, int maxDepth) +#if 0 +static void print_depth(int height, int maxDepth) { for (int i = 0; i < maxDepth - height; i++) printf(" "); } +#endif InternalNode *Octree::addTriangle(InternalNode *node, CubeTriangleIsect *p, int height) { @@ -2108,8 +2110,8 @@ void pseudoInverse(const _Matrix_Type_ &a, svd.matrixU().adjoint(); } -void solve_least_squares(const float halfA[], const float b[], - const float midpoint[], float rvalue[]) +static void solve_least_squares(const float halfA[], const float b[], + const float midpoint[], float rvalue[]) { /* calculate pseudo-inverse */ Eigen::MatrixXf A(3, 3), pinv(3, 3); @@ -2126,8 +2128,8 @@ void solve_least_squares(const float halfA[], const float b[], rvalue[i] = result(i); } -void minimize(float rvalue[3], float mp[3], const float pts[12][3], - const float norms[12][3], const int parity[12]) +static void minimize(float rvalue[3], float mp[3], const float pts[12][3], + const float norms[12][3], const int parity[12]) { float ata[6] = {0, 0, 0, 0, 0, 0}; float atb[3] = {0, 0, 0}; diff --git a/intern/raskter/raskter.c b/intern/raskter/raskter.c index 2fe9ac61a48..92ec695baf0 100644 --- a/intern/raskter/raskter.c +++ b/intern/raskter/raskter.c @@ -417,7 +417,8 @@ static int rast_scan_fill(struct r_FillContext *ctx, struct PolyVert *verts, int } int PLX_raskterize(float(*base_verts)[2], int num_base_verts, - float *buf, int buf_x, int buf_y) { + float *buf, int buf_x, int buf_y) +{ int i; /* i: Loop counter. */ struct PolyVert *ply; /* ply: Pointer to a list of integer buffer-space vertex coordinates. */ struct r_FillContext ctx = {0}; diff --git a/intern/smoke/intern/smoke_API.cpp b/intern/smoke/intern/smoke_API.cpp index b45fef26504..4bbf8e0a82b 100644 --- a/intern/smoke/intern/smoke_API.cpp +++ b/intern/smoke/intern/smoke_API.cpp @@ -28,7 +28,6 @@ * \ingroup smoke */ - #include "FLUID_3D.h" #include "WTURBULENCE.h" @@ -36,6 +35,8 @@ #include #include +#include "../extern/smoke_API.h" /* to ensure valid prototypes */ + // y in smoke is z in blender extern "C" FLUID_3D *smoke_init(int *res, float *p0, float dtdef) { @@ -283,10 +284,12 @@ extern "C" void smoke_get_ob_velocity(FLUID_3D *fluid, float **x, float **y, flo *z = fluid->_zVelocityOb; } +#if 0 extern "C" unsigned char *smoke_get_obstacle_anim(FLUID_3D *fluid) { return fluid->_obstaclesAnim; } +#endif extern "C" void smoke_turbulence_set_noise(WTURBULENCE *wt, int type) { -- cgit v1.2.3