Commit: 82f842c27f4ff483be0fda6c02d3a4527cc20ff2
Author: lazydodo
Date:   Tue Oct 18 09:25:14 2016 -0600
Branches: master
https://developer.blender.org/rB82f842c27f4ff483be0fda6c02d3a4527cc20ff2

[msvc] Minor cleanup in blenkernel.

this patch resolves the following warnings;

```
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\ocean.c       764
Warning C4098   'attach_stabilization_baseline_data': 'void' function returning 
a value         blenkernel\intern\tracking_stabilize.c  139
Warning C4028   formal parameter 3 different from declaration           
blenkernel\intern\cachefile.c   148
Warning C4028   formal parameter 3 different from declaration           
blenkernel\intern\paint.c       413
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\editderivedmesh.c     591
Warning C4028   formal parameter 3 different from declaration           
blenkernel\intern\library_remap.c       709
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\ocean.c       754
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\ocean.c       758
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\ocean.c       759
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\ocean.c       763
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\ocean.c       764
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\ocean.c       765
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\ocean.c       769
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\ocean.c       770
Warning C4028   formal parameter 1 different from declaration           
blenkernel\intern\DerivedMesh.c 3458
```

It's mostly things where the signature in the .h and the actual implementation 
in the .c do not match.  And a bunch functions who do not match the 
TaskRunFunction declaration cause they leave out the __restrict keyword.

Reviewers: brecht, juicyfruit, sergey

Reviewed By: sergey

Subscribers: Blendify

Differential Revision: https://developer.blender.org/D2268

===================================================================

M       source/blender/blenkernel/BKE_cachefile.h
M       source/blender/blenkernel/BKE_library.h
M       source/blender/blenkernel/intern/DerivedMesh.c
M       source/blender/blenkernel/intern/editderivedmesh.c
M       source/blender/blenkernel/intern/ocean.c
M       source/blender/blenkernel/intern/paint.c
M       source/blender/blenkernel/intern/tracking_stabilize.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_cachefile.h 
b/source/blender/blenkernel/BKE_cachefile.h
index b30143c..a55cb51 100644
--- a/source/blender/blenkernel/BKE_cachefile.h
+++ b/source/blender/blenkernel/BKE_cachefile.h
@@ -55,7 +55,7 @@ void BKE_cachefile_reload(const struct Main *bmain, struct 
CacheFile *cache_file
 
 void BKE_cachefile_ensure_handle(const struct Main *bmain, struct CacheFile 
*cache_file);
 
-void BKE_cachefile_update_frame(struct Main *bmain, struct Scene *scene, float 
ctime, const float fps);
+void BKE_cachefile_update_frame(struct Main *bmain, struct Scene *scene,const 
float ctime, const float fps);
 
 bool BKE_cachefile_filepath_get(
         const struct Main *bmain, const struct CacheFile *cache_file, float 
frame,
diff --git a/source/blender/blenkernel/BKE_library.h 
b/source/blender/blenkernel/BKE_library.h
index e49019f..0d82de0 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -64,7 +64,7 @@ struct ID *BKE_libblock_find_name(const short type, const 
char *name) ATTR_WARN_
 
 /* library_remap.c (keep here since they're general functions) */
 void  BKE_libblock_free(struct Main *bmain, void *idv) ATTR_NONNULL();
-void  BKE_libblock_free_ex(struct Main *bmain, void *idv, bool do_id_user) 
ATTR_NONNULL();
+void  BKE_libblock_free_ex(struct Main *bmain, void *idv, const bool 
do_id_user) ATTR_NONNULL();
 void  BKE_libblock_free_us(struct Main *bmain, void *idv) ATTR_NONNULL();
 void  BKE_libblock_free_data(struct Main *bmain, struct ID *id) ATTR_NONNULL();
 void  BKE_libblock_delete(struct Main *bmain, void *idv) ATTR_NONNULL();
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c 
b/source/blender/blenkernel/intern/DerivedMesh.c
index f75b3c0..ae18f52 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -3256,7 +3256,7 @@ void DM_calc_tangents_names_from_gpu(
        *r_tangent_names_count = count;
 }
 
-static void DM_calc_loop_tangents_thread(TaskPool *UNUSED(pool), void 
*taskdata, int UNUSED(threadid))
+static void DM_calc_loop_tangents_thread(TaskPool * __restrict UNUSED(pool), 
void *taskdata, int UNUSED(threadid))
 {
        struct SGLSLMeshToTangent *mesh2tangent = taskdata;
        /* new computation method */
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c 
b/source/blender/blenkernel/intern/editderivedmesh.c
index e51a3c3..05cf5f6 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -453,7 +453,7 @@ finally:
        pRes[3] = fSign;
 }
 
-static void emDM_calc_loop_tangents_thread(TaskPool *UNUSED(pool), void 
*taskdata, int UNUSED(threadid))
+static void emDM_calc_loop_tangents_thread(TaskPool * __restrict UNUSED(pool), 
void *taskdata, int UNUSED(threadid))
 {
        struct SGLSLEditMeshToTangent *mesh2tangent = taskdata;
        /* new computation method */
diff --git a/source/blender/blenkernel/intern/ocean.c 
b/source/blender/blenkernel/intern/ocean.c
index c5179e5..621ac9c 100644
--- a/source/blender/blenkernel/intern/ocean.c
+++ b/source/blender/blenkernel/intern/ocean.c
@@ -531,7 +531,7 @@ static void ocean_compute_htilda(void *userdata, const int 
i)
        }
 }
 
-static void ocean_compute_displacement_y(TaskPool *pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
+static void ocean_compute_displacement_y(TaskPool * __restrict pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
 {
        OceanSimulateData *osd = BLI_task_pool_userdata(pool);
        const Ocean *o = osd->o;
@@ -539,7 +539,7 @@ static void ocean_compute_displacement_y(TaskPool *pool, 
void *UNUSED(taskdata),
        fftw_execute(o->_disp_y_plan);
 }
 
-static void ocean_compute_displacement_x(TaskPool *pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
+static void ocean_compute_displacement_x(TaskPool * __restrict pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
 {
        OceanSimulateData *osd = BLI_task_pool_userdata(pool);
        const Ocean *o = osd->o;
@@ -567,7 +567,7 @@ static void ocean_compute_displacement_x(TaskPool *pool, 
void *UNUSED(taskdata),
        fftw_execute(o->_disp_x_plan);
 }
 
-static void ocean_compute_displacement_z(TaskPool *pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
+static void ocean_compute_displacement_z(TaskPool * __restrict pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
 {
        OceanSimulateData *osd = BLI_task_pool_userdata(pool);
        const Ocean *o = osd->o;
@@ -595,7 +595,7 @@ static void ocean_compute_displacement_z(TaskPool *pool, 
void *UNUSED(taskdata),
        fftw_execute(o->_disp_z_plan);
 }
 
-static void ocean_compute_jacobian_jxx(TaskPool *pool, void *UNUSED(taskdata), 
int UNUSED(threadid))
+static void ocean_compute_jacobian_jxx(TaskPool * __restrict pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
 {
        OceanSimulateData *osd = BLI_task_pool_userdata(pool);
        const Ocean *o = osd->o;
@@ -627,7 +627,7 @@ static void ocean_compute_jacobian_jxx(TaskPool *pool, void 
*UNUSED(taskdata), i
        }
 }
 
-static void ocean_compute_jacobian_jzz(TaskPool *pool, void *UNUSED(taskdata), 
int UNUSED(threadid))
+static void ocean_compute_jacobian_jzz(TaskPool * __restrict pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
 {
        OceanSimulateData *osd = BLI_task_pool_userdata(pool);
        const Ocean *o = osd->o;
@@ -659,7 +659,7 @@ static void ocean_compute_jacobian_jzz(TaskPool *pool, void 
*UNUSED(taskdata), i
        }
 }
 
-static void ocean_compute_jacobian_jxz(TaskPool *pool, void *UNUSED(taskdata), 
int UNUSED(threadid))
+static void ocean_compute_jacobian_jxz(TaskPool * __restrict pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
 {
        OceanSimulateData *osd = BLI_task_pool_userdata(pool);
        const Ocean *o = osd->o;
@@ -685,7 +685,7 @@ static void ocean_compute_jacobian_jxz(TaskPool *pool, void 
*UNUSED(taskdata), i
        fftw_execute(o->_Jxz_plan);
 }
 
-static void ocean_compute_normal_x(TaskPool *pool, void *UNUSED(taskdata), int 
UNUSED(threadid))
+static void ocean_compute_normal_x(TaskPool * __restrict pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
 {
        OceanSimulateData *osd = BLI_task_pool_userdata(pool);
        const Ocean *o = osd->o;
@@ -704,7 +704,7 @@ static void ocean_compute_normal_x(TaskPool *pool, void 
*UNUSED(taskdata), int U
        fftw_execute(o->_N_x_plan);
 }
 
-static void ocean_compute_normal_z(TaskPool *pool, void *UNUSED(taskdata), int 
UNUSED(threadid))
+static void ocean_compute_normal_z(TaskPool * __restrict pool, void 
*UNUSED(taskdata), int UNUSED(threadid))
 {
        OceanSimulateData *osd = BLI_task_pool_userdata(pool);
        const Ocean *o = osd->o;
diff --git a/source/blender/blenkernel/intern/paint.c 
b/source/blender/blenkernel/intern/paint.c
index 53675f3..6b954f0 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -409,7 +409,7 @@ Palette *BKE_palette_copy(Main *bmain, Palette *palette)
        return palette_new;
 }
 
-void BKE_palette_make_local(Main *bmain, Palette *palette, bool lib_local)
+void BKE_palette_make_local(Main *bmain, Palette *palette, const bool 
lib_local)
 {
        BKE_id_make_local_generic(bmain, &palette->id, true, lib_local);
 }
diff --git a/source/blender/blenkernel/intern/tracking_stabilize.c 
b/source/blender/blenkernel/intern/tracking_stabilize.c
index df42f25..b8949f9 100644
--- a/source/blender/blenkernel/intern/tracking_stabilize.c
+++ b/source/blender/blenkernel/intern/tracking_stabilize.c
@@ -136,7 +136,7 @@ static void attach_stabilization_baseline_data(
         MovieTrackingTrack *track,
         TrackStabilizationBase *private_data)
 {
-       return BLI_ghash_insert(ctx->private_track_data, track, private_data);
+       BLI_ghash_insert(ctx->private_track_data, track, private_data);
 }
 
 static void discard_stabilization_baseline_data(void *val)

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to