quiet some warnings from recent merge
authorCampbell Barton <ideasman42@gmail.com>
Thu, 10 Nov 2011 12:28:26 +0000 (12:28 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 10 Nov 2011 12:28:26 +0000 (12:28 +0000)
source/blender/blenkernel/BKE_dynamicpaint.h
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/pointcache.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/makesdna/DNA_dynamicpaint_types.h
source/blender/makesrna/intern/rna_dynamicpaint.c
source/blender/modifiers/intern/MOD_dynamicpaint.c

index 75b1f74..14094cb 100644 (file)
@@ -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);
 
index 9d1401a..55b8b04 100644 (file)
@@ -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
+}
index c256e99..d5460a4 100644 (file)
@@ -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);
 }
index 888b5af..550da63 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 
 #include "DNA_dynamicpaint_types.h"
 #include "DNA_modifier_types.h"
@@ -52,7 +53,7 @@
 #include "WM_types.h"
 #include "WM_api.h"
 
-static int surface_slot_add_exec(bContext *C, wmOperator *op)
+static int surface_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
 {
        DynamicPaintModifierData *pmd = 0;
        Object *cObject = CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
@@ -94,7 +95,7 @@ void DPAINT_OT_surface_slot_add(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-static int surface_slot_remove_exec(bContext *C, wmOperator *op)
+static int surface_slot_remove_exec(bContext *C, wmOperator *UNUSED(op))
 {
        DynamicPaintModifierData *pmd = 0;
        Object *cObject = CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
@@ -418,4 +419,4 @@ void DPAINT_OT_bake(wmOperatorType *ot)
        /* api callbacks */
        ot->exec= dynamicpaint_bake_exec;
        ot->poll= ED_operator_object_active_editable;
-}
\ No newline at end of file
+}
index ade3a65..1bc55b8 100644 (file)
@@ -403,7 +403,7 @@ static int draw_tface__set_draw_legacy(MTFace *tface, int has_mcol, int matnr)
        }
 }
 
-static int draw_mcol__set_draw_legacy(MTFace *tface, int has_mcol, int matnr)
+static int draw_mcol__set_draw_legacy(MTFace *UNUSED(tface), int has_mcol, int UNUSED(matnr))
 {
        if (has_mcol) return 1;
        else return 2;
index c8dfdf8..04d50c7 100644 (file)
@@ -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 *****
 */
index 1f678fa..754ed82 100644 (file)
@@ -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 *****
  */
index f697f14..c6b9e57 100644 (file)
@@ -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 *****
 *
@@ -21,6 +21,8 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_utildefines.h"
+
 #include "BKE_cdderivedmesh.h"
 #include "BKE_dynamicpaint.h"
 #include "BKE_modifier.h"
@@ -53,7 +55,7 @@ static void freeData(ModifierData *md)
        dynamicPaint_Modifier_free(pmd);
 }
 
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
 {
        DynamicPaintModifierData *pmd = (DynamicPaintModifierData*)md;
        CustomDataMask dataMask = 0;
@@ -88,8 +90,8 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
 
 static DerivedMesh *applyModifier(ModifierData *md, Object *ob, 
                                                DerivedMesh *dm,
-                                               int useRenderParams,
-                                               int isFinalCalc)
+                                               int UNUSED(useRenderParams),
+                                               int UNUSED(isFinalCalc))
 {
        DynamicPaintModifierData *pmd = (DynamicPaintModifierData*) md;
 
@@ -120,7 +122,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
        }
 }
 
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
 {
        return 1;
 }
@@ -143,8 +145,8 @@ static void foreachIDLink(ModifierData *md, Object *ob,
        }
 }
 
-static void foreachTexLink(ModifierData *md, Object *ob,
-                                          TexWalkFunc walk, void *userData)
+static void foreachTexLink(ModifierData *UNUSED(md), Object *UNUSED(ob),
+                                          TexWalkFunc UNUSED(walk), void *UNUSED(userData))
 {
        //walk(userData, ob, md, ""); /* re-enable when possible */
 }