diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-10 16:28:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-10 16:28:26 +0400 |
commit | dfc30d12292987cde384d999a52a9d52d13bdb2c (patch) | |
tree | 4fb07b10b4d8a27c541b0f48aa1681679e1d5d7b /source/blender/blenkernel | |
parent | ba9794af021696eae92813546a069d902f7988c0 (diff) |
quiet some warnings from recent merge
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_dynamicpaint.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 36 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 10 |
3 files changed, 31 insertions, 19 deletions
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h index 75b1f74a403..14094cb2ac6 100644 --- a/source/blender/blenkernel/BKE_dynamicpaint.h +++ b/source/blender/blenkernel/BKE_dynamicpaint.h @@ -6,7 +6,7 @@ * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * - * Contributor(s): Miika Hämäläinen + * Contributor(s): Miika Hämäläinen * * ***** END GPL LICENSE BLOCK ***** */ @@ -66,7 +66,7 @@ void dynamicPaint_cacheUpdateFrames(struct DynamicPaintSurface *surface); int dynamicPaint_surfaceHasColorPreview(struct DynamicPaintSurface *surface); int dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, struct Object *ob, int index); void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface); -void dynamicPaintSurface_setUniqueName(struct DynamicPaintSurface *surface, char *basename); +void dynamicPaintSurface_setUniqueName(struct DynamicPaintSurface *surface, const char *basename); void dynamicPaint_resetPreview(struct DynamicPaintCanvasSettings *canvas); struct DynamicPaintSurface *get_activeSurface(struct DynamicPaintCanvasSettings *canvas); diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 9d1401acdfc..55b8b045509 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -6,7 +6,7 @@ * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * - * Contributor(s): Miika Hämäläinen + * Contributor(s): Miika Hämäläinen * * ***** END GPL LICENSE BLOCK ***** */ @@ -204,7 +204,7 @@ typedef struct PaintAdjData { /***************************** General Utils ******************************/ /* Set canvas error string to display at the bake report */ -static int setError(DynamicPaintCanvasSettings *canvas, char *string) +static int setError(DynamicPaintCanvasSettings *canvas, const char *string) { /* Add error to canvas ui info label */ BLI_snprintf(canvas->error, sizeof(canvas->error), string); @@ -339,7 +339,7 @@ static int surface_duplicateNameExists(void *arg, const char *name) return 0; } -void dynamicPaintSurface_setUniqueName(DynamicPaintSurface *surface, char *basename) +void dynamicPaintSurface_setUniqueName(DynamicPaintSurface *surface, const char *basename) { char name[64]; BLI_strncpy(name, basename, sizeof(name)); /* in case basename is surface->name use a copy */ @@ -488,7 +488,7 @@ static void scene_setSubframe(Scene *scene, float subframe) #define BRUSH_USES_VELOCITY (1<<0) -static int surface_getBrushFlags(DynamicPaintSurface *surface, Scene *scene, Object *ob) +static int surface_getBrushFlags(DynamicPaintSurface *surface, Scene *scene, Object *UNUSED(ob)) { Base *base = NULL; GroupObject *go = NULL; @@ -1516,7 +1516,10 @@ static void dynamicPaint_applySurfaceDisplace(DynamicPaintSurface *surface, Deri /* * Apply canvas data to the object derived mesh */ -static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd, Scene *scene, Object *ob, DerivedMesh *dm) +static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd, + Scene *UNUSED(scene), + Object *ob, + DerivedMesh *dm) { DerivedMesh *result = CDDM_copy(dm); @@ -2068,7 +2071,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface) PaintUVPoint *tempPoints = NULL; Vec3f *tempWeights = NULL; - MVert *mvert = NULL; + /* MVert *mvert = NULL; */ /* UNUSED */ MFace *mface = NULL; MTFace *tface = NULL; Bounds2D *faceBB = NULL; @@ -2079,7 +2082,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface) if (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ) return setError(canvas, "Can't bake non-\"image sequence\" formats."); numOfFaces = dm->getNumFaces(dm); - mvert = dm->getVertArray(dm); + /* mvert = dm->getVertArray(dm); */ /* UNUSED */ mface = dm->getFaceArray(dm); /* get uv layer */ @@ -3039,7 +3042,7 @@ static void dynamicPaint_brushMeshCalculateVelocity(Scene *scene, Object *ob, Dy } /* calculate velocity for object center point */ -static void dynamicPaint_brushObjectCalculateVelocity(Scene *scene, Object *ob, DynamicPaintBrushSettings *brush, Vec3f *brushVel, float timescale) +static void dynamicPaint_brushObjectCalculateVelocity(Scene *scene, Object *ob, DynamicPaintBrushSettings *UNUSED(brush), Vec3f *brushVel, float timescale) { float prev_obmat[4][4]; float cur_loc[3] = {0.0f}, prev_loc[3] = {0.0f}; @@ -3076,7 +3079,13 @@ static void dynamicPaint_brushObjectCalculateVelocity(Scene *scene, Object *ob, /* * Paint a brush object mesh to the surface */ -static int dynamicPaint_paintMesh(DynamicPaintSurface *surface, DynamicPaintBrushSettings *brush, Object *canvasOb, Object *brushOb, BrushMaterials *bMats, Scene *scene, float timescale) +static int dynamicPaint_paintMesh(DynamicPaintSurface *surface, + DynamicPaintBrushSettings *brush, + Object *UNUSED(canvasOb), + Object *brushOb, + BrushMaterials *bMats, + Scene *scene, + float timescale) { PaintSurfaceData *sData = surface->data; PaintBakeData *bData = sData->bData; @@ -3449,7 +3458,10 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface, DynamicPaintBrus /* * Paint a particle system to the surface */ -static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, ParticleSystem *psys, DynamicPaintBrushSettings *brush, Object *canvasOb, float timescale) +static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, + ParticleSystem *psys, + DynamicPaintBrushSettings *brush, + Object *UNUSED(canvasOb), float timescale) { ParticleSettings *part=psys->part; ParticleData *pa = NULL; @@ -3686,7 +3698,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, ParticleSys /* paint a single point of defined proximity radius to the surface */ static int dynamicPaint_paintSinglePoint(DynamicPaintSurface *surface, float *pointCoord, DynamicPaintBrushSettings *brush, - Object *canvasOb, Object *brushOb, BrushMaterials *bMats, Scene *scene, float timescale) + Object *UNUSED(canvasOb), Object *brushOb, BrushMaterials *bMats, Scene *scene, float timescale) { int index; PaintSurfaceData *sData = surface->data; @@ -4878,4 +4890,4 @@ int dynamicPaint_calculateFrame(DynamicPaintSurface *surface, Scene *scene, Obje } return dynamicPaint_doStep(scene, cObject, surface, timescale, 0.0f); -}
\ No newline at end of file +} diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index c256e99cd24..d5460a4e6ce 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -122,7 +122,7 @@ static int ptcache_extra_datasize[] = { /* forward declerations */ static int ptcache_file_compressed_read(PTCacheFile *pf, unsigned char *result, unsigned int len); static int ptcache_file_compressed_write(PTCacheFile *pf, unsigned char *in, unsigned int in_len, unsigned char *out, int mode); -static int ptcache_file_write(PTCacheFile *pf, void *f, unsigned int tot, unsigned int size); +static int ptcache_file_write(PTCacheFile *pf, const void *f, unsigned int tot, unsigned int size); static int ptcache_file_read(PTCacheFile *pf, void *f, unsigned int tot, unsigned int size); /* Common functions */ @@ -657,11 +657,11 @@ static int ptcache_smoke_read(PTCacheFile *pf, void *smoke_v) } #else // WITH_SMOKE static int ptcache_smoke_totpoint(void *UNUSED(smoke_v), int UNUSED(cfra)) { return 0; }; -static void ptcache_smoke_read(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) {} +static int ptcache_smoke_read(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) { return 0; } static int ptcache_smoke_write(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) { return 0; } #endif // WITH_SMOKE -static int ptcache_dynamicpaint_totpoint(void *sd, int cfra) +static int ptcache_dynamicpaint_totpoint(void *sd, int UNUSED(cfra)) { DynamicPaintSurface *surface = (DynamicPaintSurface*)sd; @@ -677,7 +677,7 @@ static int ptcache_dynamicpaint_write(PTCacheFile *pf, void *dp_v) int cache_compress = 1; /* version header */ - ptcache_file_write(pf, DPAINT_CACHE_VERSION, 1, sizeof(char)*4); + ptcache_file_write(pf, (void *)DPAINT_CACHE_VERSION, 1, sizeof(char)*4); if(surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ && surface->data) { unsigned int total_points=surface->data->total_points; @@ -1261,7 +1261,7 @@ static int ptcache_file_read(PTCacheFile *pf, void *f, unsigned int tot, unsigne { return (fread(f, size, tot, pf->fp) == tot); } -static int ptcache_file_write(PTCacheFile *pf, void *f, unsigned int tot, unsigned int size) +static int ptcache_file_write(PTCacheFile *pf, const void *f, unsigned int tot, unsigned int size) { return (fwrite(f, size, tot, pf->fp) == tot); } |