[Bf-blender-cvs] [32be51d] master: Cleanup: warnings (msvc)
Campbell Barton
noreply at git.blender.org
Mon Dec 21 03:04:11 CET 2015
Commit: 32be51dc66ae0e791970c8b7326afa16d60aa267
Author: Campbell Barton
Date: Mon Dec 21 13:00:06 2015 +1100
Branches: master
https://developer.blender.org/rB32be51dc66ae0e791970c8b7326afa16d60aa267
Cleanup: warnings (msvc)
Part of patch D1670 by @LazyDodo
===================================================================
M intern/locale/boost_locale_wrapper.cpp
M source/blender/blenkernel/intern/image.c
M source/blender/blenkernel/intern/mesh_evaluate.c
M source/blender/blenkernel/intern/particle.c
M source/blender/blenkernel/intern/particle_distribute.c
M source/blender/blenkernel/intern/scene.c
M source/blender/blenlib/BLI_timecode.h
M source/blender/blenlib/intern/buffer.c
M source/blender/blenlib/intern/dynlib.c
M source/blender/blenlib/intern/sort.c
M source/blender/blenlib/intern/string.c
M source/blender/blenlib/intern/time.c
M source/blender/editors/armature/editarmature_retarget.c
M source/blender/editors/armature/meshlaplacian.c
M source/blender/editors/curve/curve_intern.h
M source/blender/editors/include/ED_transform.h
M source/blender/editors/mask/mask_draw.c
M source/blender/editors/sculpt_paint/paint_image_proj.c
M source/blender/editors/space_clip/clip_editor.c
M source/blender/editors/space_clip/clip_ops.c
M source/blender/editors/space_file/filelist.c
M source/blender/imbuf/intern/imageprocess.c
M source/blender/render/intern/source/volume_precache.c
===================================================================
diff --git a/intern/locale/boost_locale_wrapper.cpp b/intern/locale/boost_locale_wrapper.cpp
index 5eb2f7f..0707c0d 100644
--- a/intern/locale/boost_locale_wrapper.cpp
+++ b/intern/locale/boost_locale_wrapper.cpp
@@ -114,10 +114,12 @@ const char *bl_locale_pgettext(const char *msgctxt, const char *msgid)
}
catch(std::bad_cast const &e) { /* if std::has_facet<char_message_facet>(l) == false, LC_ALL = "C" case */
// std::cout << "bl_locale_pgettext(" << msgid << "): " << e.what() << " \n";
+ (void)e;
return msgid;
}
catch(std::exception const &e) {
// std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n";
+ (void)e;
return msgid;
}
}
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 6ff3013..21d8f8d 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2092,7 +2092,7 @@ void BKE_render_result_stamp_info(Scene *scene, Object *camera, struct RenderRes
void BKE_stamp_info_callback(void *data, struct StampData *stamp_data, StampCallback callback, bool noskip)
{
- if (!callback || !stamp_data) {
+ if ((callback == NULL) || (stamp_data == NULL)) {
return;
}
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index a65ac51..7aad5ad 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -937,7 +937,7 @@ static void loop_split_worker_do(
}
}
-static void loop_split_worker(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
+static void loop_split_worker(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
{
LoopSplitTaskDataCommon *common_data = taskdata;
LoopSplitTaskData *data_buff;
@@ -1116,7 +1116,7 @@ static void loop_split_generator_do(LoopSplitTaskDataCommon *common_data, const
#endif
}
-static void loop_split_generator(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
+static void loop_split_generator(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
{
LoopSplitTaskDataCommon *common_data = taskdata;
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 4429f4b..b3be567 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2327,7 +2327,7 @@ static void psys_thread_create_path(ParticleTask *task, struct ChildParticle *cp
child_keys->segments = -1;
}
-static void exec_child_path_cache(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
+static void exec_child_path_cache(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
{
ParticleTask *task = taskdata;
ParticleThreadContext *ctx = task->ctx;
diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c
index 0c7d859..9523ece 100644
--- a/source/blender/blenkernel/intern/particle_distribute.c
+++ b/source/blender/blenkernel/intern/particle_distribute.c
@@ -660,7 +660,7 @@ static void distribute_children_exec(ParticleTask *thread, ChildParticle *cpa, i
BLI_rng_skip(thread->rng, rng_skip_tot);
}
-static void exec_distribute_parent(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
+static void exec_distribute_parent(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
{
ParticleTask *task = taskdata;
ParticleSystem *psys= task->ctx->sim.psys;
@@ -686,7 +686,7 @@ static void exec_distribute_parent(TaskPool *UNUSED(pool), void *taskdata, int U
}
}
-static void exec_distribute_child(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
+static void exec_distribute_child(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
{
ParticleTask *task = taskdata;
ParticleSystem *psys = task->ctx->sim.psys;
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 504c116..73d211f 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1472,7 +1472,7 @@ static void scene_update_all_bases(EvaluationContext *eval_ctx, Scene *scene, Sc
}
}
-static void scene_update_object_func(TaskPool *pool, void *taskdata, int threadid)
+static void scene_update_object_func(TaskPool * __restrict pool, void *taskdata, int threadid)
{
/* Disable print for now in favor of summary statistics at the end of update. */
#define PRINT if (false) printf
diff --git a/source/blender/blenlib/BLI_timecode.h b/source/blender/blenlib/BLI_timecode.h
index 235d928..a45613c 100644
--- a/source/blender/blenlib/BLI_timecode.h
+++ b/source/blender/blenlib/BLI_timecode.h
@@ -39,7 +39,7 @@ size_t BLI_timecode_string_from_time(
ATTR_NONNULL();
size_t BLI_timecode_string_from_time_simple(
- char *str, size_t maxlen, const double time_seconds)
+ char *str, const size_t maxlen, const double time_seconds)
ATTR_NONNULL();
size_t BLI_timecode_string_from_time_seconds(
diff --git a/source/blender/blenlib/intern/buffer.c b/source/blender/blenlib/intern/buffer.c
index 24b2228..525b183 100644
--- a/source/blender/blenlib/intern/buffer.c
+++ b/source/blender/blenlib/intern/buffer.c
@@ -107,7 +107,7 @@ void BLI_buffer_resize(BLI_Buffer *buffer, const size_t new_count)
* - Ignored (malloc'd)
* - Cleared (when BLI_BUFFER_USE_CALLOC is set)
*/
-void BLI_buffer_reinit(BLI_Buffer *buffer, size_t new_count)
+void BLI_buffer_reinit(BLI_Buffer *buffer, const size_t new_count)
{
if (UNLIKELY(new_count > buffer->alloc_count)) {
if ((buffer->flag & BLI_BUFFER_USE_STATIC) == 0) {
diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.c
index e916b01..b47c2ee 100644
--- a/source/blender/blenlib/intern/dynlib.c
+++ b/source/blender/blenlib/intern/dynlib.c
@@ -42,8 +42,9 @@ struct DynamicLibrary {
};
#ifdef WIN32
-
+#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x501 /* Windows XP or newer */
+#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "utf_winfunc.h"
diff --git a/source/blender/blenlib/intern/sort.c b/source/blender/blenlib/intern/sort.c
index c5922fe..190c874 100644
--- a/source/blender/blenlib/intern/sort.c
+++ b/source/blender/blenlib/intern/sort.c
@@ -40,6 +40,10 @@
#include "BLI_sort.h"
+#ifdef min /* for msvc */
+# undef min
+#endif
+
/* note: modified to use glibc arg order for callback */
/* **** qsort based on FreeBSD source (libkern\qsort.c) **** */
BLI_INLINE char *med3(char *, char *, char *, BLI_sort_cmp_t, void *);
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index e93d2b7..efc89ff 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -841,7 +841,7 @@ bool BLI_strn_endswith(const char *__restrict str, const char *__restrict end, s
* \param end The string we look for at the end.
* \return If str ends with end.
*/
-bool BLI_str_endswith(const char *__restrict str, const char *end)
+bool BLI_str_endswith(const char *__restrict str, const char * __restrict end)
{
const size_t slength = strlen(str);
return BLI_strn_endswith(str, end, slength);
diff --git a/source/blender/blenlib/intern/time.c b/source/blender/blenlib/intern/time.c
index a0fb78c..3cf3221 100644
--- a/source/blender/blenlib/intern/time.c
+++ b/source/blender/blenlib/intern/time.c
@@ -33,8 +33,9 @@
#include "PIL_time.h"
#ifdef WIN32
-
+#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x501 /* Windows XP or newer */
+#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 2235f9f..7c09ad4 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -82,7 +82,7 @@ static RigGraph *GLOBAL_RIGG = NULL;
/*******************************************************************************************************/
-void exec_retargetArctoArc(TaskPool *pool, void *taskdata, int threadid);
+void exec_retargetArctoArc(TaskPool * __restrict pool, void *taskdata, int threadid);
static void RIG_calculateEdgeAngles(RigEdge *edge_first, RigEdge *edge_second);
float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4]);
@@ -2143,7 +2143,7 @@ static void retargetArctoArc(bContext *C, RigGraph *rigg, RigArc *iarc, RigNode
BLI_task_pool_push(rigg->task_pool, exec_retargetArctoArc, p, true, TASK_PRIORITY_HIGH);
}
-void exec_retargetArctoArc(TaskPool *UNUSED(pool), void *taskdata, int UNUSED(threadid))
+void exec_retargetArctoArc(TaskPool * __restrict UNUSED(pool), void *taskdata, int UNUSED(threadid))
{
RetargetParam *p = (RetargetParam *)taskdata;
RigGraph *rigg = p->rigg;
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index ce87ffb..549b60c 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -576,7 +576,7 @@ static void heat_laplacian_create(LaplacianSystem *sys)
static void heat_system_free(LaplacianSystem *sys)
{
BLI_bvhtree_free(sys->heat.bvhtree);
- MEM_freeN(sys->heat.vltree);
+ MEM_freeN((void *)sys->heat.vltree);
MEM_freeN((void *)sys->heat.mlooptri);
MEM_freeN(sys->heat.mindist);
diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index 29904bf..ce7487f 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -134,7 +134,7 @@ bool ED_curve_pick_vert(
/* helper functions */
void ed_editnurb_translate_flag(struct ListBase *editnurb, short flag, const float vec[3]);
-bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, short flag);
+bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, const short flag);
bool ed_editnurb_spin(float viewmat[4][4], struct Object *obedit, const float axis[3], const float cent[3]);
/* editcurve_select.c */
di
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list