/**************************** Threading Code **********************************/
/******************************************************************************/
-void* AUD_openalRunThread(void* device)
+static void *AUD_openalRunThread(void *device)
{
AUD_OpenALDevice* dev = (AUD_OpenALDevice*)device;
dev->updateStreams();
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;
NULL, NULL, NULL, NULL
};
-CCLDeviceInfo *compute_device_list(DeviceType type)
+static CCLDeviceInfo *compute_device_list(DeviceType type)
{
/* device list stored static */
static ccl::vector<CCLDeviceInfo> device_list;
/**
* 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) {
#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];
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)
{
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);
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};
}
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};
* \ingroup smoke
*/
-
#include "FLUID_3D.h"
#include "WTURBULENCE.h"
#include <stdlib.h>
#include <math.h>
+#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)
{
*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)
{
{
TrackContext *track_context = (TrackContext *)customdata;
-#if WITH_LIBMV
+#ifdef WITH_LIBMV
if (track_context->search_area)
MEM_freeN(track_context->search_area);
int BKE_tracking_reconstruction_check(MovieTracking *tracking, MovieTrackingObject *object, char *error_msg, int error_size)
{
-#if WITH_LIBMV
+#ifdef WITH_LIBMV
ListBase *tracksbase = BKE_tracking_object_get_tracks(tracking, object);
if (tracking->settings.motion_flag & TRACKING_MOTION_MODAL) {
* (loop cuts, edge subdivides, etc) are not reflected in the higher levels of
* the mesh at all, which doesn't seem right. Turning off completely for now,
* until this is shown to be better for certain types of mesh edits. */
-#if BMOP_UNTAN_MULTIRES_ENABLED
+#ifdef BMOP_UNTAN_MULTIRES_ENABLED
/* switch multires data out of tangent space */
if ((type_flag & BMO_OP_FLAG_UNTAN_MULTIRES) && CustomData_has_layer(&bm->ldata, CD_MDISPS)) {
bmesh_mdisps_space_set(bm, MULTIRES_SPACE_TANGENT, MULTIRES_SPACE_ABSOLUTE);
void bmesh_edit_end(BMesh *bm, int UNUSED(flag))
{
/* BMO_OP_FLAG_UNTAN_MULTIRES disabled for now, see comment above in bmesh_edit_begin. */
-#if BMOP_UNTAN_MULTIRES_ENABLED
+#ifdef BMOP_UNTAN_MULTIRES_ENABLED
/* switch multires data into tangent space */
if ((flag & BMO_OP_FLAG_UNTAN_MULTIRES) && CustomData_has_layer(&bm->ldata, CD_MDISPS)) {
/* set normals to their previous winding */
}
}
-float clipuv(float x, float limit)
+static float clipuv(float x, float limit)
{
x = (x < 0) ? 0 : ((x >= limit) ? (limit - 1) : x);
return x;
#include "BKE_global.h"
+#include "COM_compositor.h"
#include "COM_WorkScheduler.h"
#include "COM_CPUDevice.h"
#include "COM_OpenCLDevice.h"
#endif
}
-extern void clContextError(const char *errinfo, const void *private_info, size_t cb, void *user_data)
+static void clContextError(const char *errinfo, const void *private_info, size_t cb, void *user_data)
{
printf("OPENCL error: %s\n", errinfo);
}
static ThreadMutex s_compositorMutex;
static char is_compositorMutex_init = FALSE;
-void intern_freeCompositorCaches()
+static void intern_freeCompositorCaches()
{
deintializeDistortionCache();
}
BLI_mutex_unlock(&s_compositorMutex);
}
-void COM_freeCaches()
+static void UNUSED_FUNCTION(COM_freeCaches)()
{
if (is_compositorMutex_init) {
BLI_mutex_lock(&s_compositorMutex);
}
}
-void COM_deinitialize()
+void COM_deinitialize()
{
if (is_compositorMutex_init) {
BLI_mutex_lock(&s_compositorMutex);
}
//------------------------------------------------------------------------------
-void convolve(float *dst, MemoryBuffer *in1, MemoryBuffer *in2)
+static void convolve(float *dst, MemoryBuffer *in1, MemoryBuffer *in2)
{
fREAL *data1, *data2, *fp;
unsigned int w2, h2, hw, hh, log2_w, log2_h;
float *rectf = NULL;
int ymin, ymax, xmin, xmax;
int rymin, rxmin;
- unsigned char *rectc;
+ /* unsigned char *rectc; */ /* UNUSED */
/* if renrect argument, we only refresh scanlines */
if (renrect) {
imb_addrectImBuf(ibuf);
rectf += 4 * (rr->rectx * ymin + xmin);
- rectc = (unsigned char *)(ibuf->rect + ibuf->x * rymin + rxmin);
+ /* rectc = (unsigned char *)(ibuf->rect + ibuf->x * rymin + rxmin); */ /* UNUSED */
IMB_partial_display_buffer_update(ibuf, rectf, NULL, rr->rectx, rxmin, rymin,
&scene->view_settings, &scene->display_settings,
return OPERATOR_FINISHED;
}
-static void NLA_OT_bake(wmOperatorType *ot)
+/* why isn't this used? */
+static void UNUSED_FUNCTION(NLA_OT_bake)(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Bake Strips";
return true;
}
-int initialize_scene(Object *ob, bPoseChannel *pchan_tip)
+static int initialize_scene(Object *ob, bPoseChannel *pchan_tip)
{
bConstraint *con;
int treecount;
};
- const char * getDxgiFormatString(DXGI_FORMAT dxgiFormat)
+ static const char * getDxgiFormatString(DXGI_FORMAT dxgiFormat)
{
#define CASE(format) case DXGI_FORMAT_##format: return #format
switch (dxgiFormat)
#undef CASE
}
- const char * getD3d10ResourceDimensionString(D3D10_RESOURCE_DIMENSION resourceDimension)
+ static const char * getD3d10ResourceDimensionString(D3D10_RESOURCE_DIMENSION resourceDimension)
{
switch (resourceDimension)
{
} // namespace
-uint findD3D9Format(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask)
+static uint findD3D9Format(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask)
{
for (int i = 0; i < s_d3dFormatCount; i++)
{
return tmp;
}
-void rtbuild_calc_bb(RTBuilder *b)
+static void rtbuild_calc_bb(RTBuilder *b)
{
if (b->bb[0] == 1.0e30f) {
for (RTBuilder::Object **index = b->sorted_begin[0]; index != b->sorted_end[0]; index++)
}
}
-void bfree(VBVHTree *tree)
+static void bfree(VBVHTree *tree)
{
if (tot_pushup + tot_pushdown + tot_hints + tot_moves) {
if (G.debug & G_DEBUG) {
#include <stdio.h>
#include <string.h>
-#if WIN32
-#include <Windows.h>
+#ifdef WIN32
+# include <Windows.h>
#endif
#include "MEM_guardedalloc.h"
extern void free_anim_drivers_copybuf(void);
extern void free_fmodifiers_copybuf(void);
-#if WIN32
+#ifdef WIN32
/* Read console events until there is a key event. Also returns on any error. */
static void wait_for_console_key(void)
{