patch [#30227] Various MSVC (32-bit) Warning and Typo Fixes

made some small edits
- removed changes to AVI reading since the data types are apart of the format spec.
- absf -> abs for a double value in render code.
This commit is contained in:
Campbell Barton 2012-02-17 19:21:47 +00:00
parent 2b7ca2304a
commit 61596d5bb3
11 changed files with 26 additions and 29 deletions

@ -8,7 +8,7 @@
# This can also be an environment variable.
# OPENEXR_FOUND, If false, do not try to use OpenEXR.
#
# For indervidual library access these advanced settings are available
# For individual library access these advanced settings are available
# OPENEXR_HALF_LIBRARY, Path to Half library
# OPENEXR_IEX_LIBRARY, Path to Half library
# OPENEXR_ILMIMF_LIBRARY, Path to Ilmimf library

@ -31,11 +31,11 @@
#include "AUD_Buffer.h"
#define AUD_U8_0 0x80
#define AUD_S16_MAX 0x7FFF
#define AUD_S16_MIN 0x8000
#define AUD_S16_MAX ((int16_t)0x7FFF)
#define AUD_S16_MIN ((int16_t)0x8000)
#define AUD_S16_FLT 32767.0f
#define AUD_S32_MAX 0x7FFFFFFF
#define AUD_S32_MIN 0x80000000
#define AUD_S32_MAX ((int32_t)0x7FFFFFFF)
#define AUD_S32_MIN ((int32_t)0x80000000)
#define AUD_S32_FLT 2147483647.0f
#define AUD_FLT_MAX 1.0f
#define AUD_FLT_MIN -1.0f

@ -200,7 +200,7 @@ void AUD_JOSResampleReader::updateBuffer(int size, double factor, int samplesize
left\
}\
\
P = -P;\
P = 0 - P;\
\
end = (int_to_fp(m_len) - P) / P_increment - 1;\
if(m_cache_valid - m_n - 2 < end)\

@ -54,10 +54,10 @@ int BKE_alphatest_ibuf(struct ImBuf *ibuf);
int BKE_write_ibuf_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
int BKE_write_ibuf(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
int BKE_write_ibuf_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy);
void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, char imtype, const short use_ext, const short use_frames);
void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames);
int BKE_add_image_extension(char *string, const char imtype);
char BKE_ftype_to_imtype(const int ftype);
int BKE_imtype_to_ftype(char imtype);
int BKE_imtype_to_ftype(const char imtype);
int BKE_imtype_is_movie(const char imtype);
int BKE_imtype_supports_zbuf(const char imtype);

@ -2285,7 +2285,7 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra
/* float offset; unused for now */
float time, nexttime;
/* TODO: this has to be sorter out once bsystem_time gets redone, */
/* TODO: this has to be sorted out once bsystem_time gets redone, */
/* now caches can handle interpolating etc. too - jahka */
/* time handling for point cache:

@ -225,10 +225,13 @@
#define GET_INT_FROM_POINTER(i) ((int)(intptr_t)(i))
/* Macro to convert a value to string in the preprocessor
* STRINGIFY_ARG: gives the defined name in the string
* STRINGIFY: gives the defined value. */
#define STRINGIFY_ARG(x) #x
#define STRINGIFY(x) STRINGIFY_ARG(x)
* STRINGIFY_ARG: gives the argument as a string
* STRINGIFY_APPEND: appends any argument 'b' onto the string argument 'a',
* used by STRINGIFY because some preprocessors warn about zero arguments
* STRINGIFY: gives the argument's value as a string */
#define STRINGIFY_ARG(x) "" #x
#define STRINGIFY_APPEND(a, b) "" a #b
#define STRINGIFY(x) STRINGIFY_APPEND("", x)
/* useful for debugging */
#define AT __FILE__ ":" STRINGIFY(__LINE__)

@ -163,7 +163,7 @@ MINLINE void linearrgb_to_srgb_ushort4_predivide(unsigned short srgb[4], const f
for(i=0; i<3; ++i) {
t = linear[i] * inv_alpha;
srgb[i] = (t < 1.0f)? to_srgb_table_lookup(t) * alpha : FTOUSHORT(linearrgb_to_srgb(t) * alpha);
srgb[i] = (t < 1.0f)? (unsigned short)(to_srgb_table_lookup(t) * alpha) : FTOUSHORT(linearrgb_to_srgb(t) * alpha);
}
srgb[3] = FTOUSHORT(linear[3]);

@ -3838,7 +3838,7 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
if((fd->flags & FD_FLAGS_SWITCH_ENDIAN) && mesh->tface) {
TFace *tf= mesh->tface;
unsigned int i;
int i;
for (i=0; i< (mesh->totface); i++, tf++) {
SWITCH_INT(tf->col[0]);
@ -7497,15 +7497,16 @@ static void do_versions_nodetree_convert_angle(bNodeTree *ntree)
void do_versions_image_settings_2_60(Scene *sce)
{
/* note: rd->subimtype is moved into indervidual settings now and no longer
/* note: rd->subimtype is moved into individual settings now and no longer
* exists */
RenderData *rd= &sce->r;
ImageFormatData *imf= &sce->r.im_format;
imf->imtype= rd->imtype;
imf->planes= rd->planes;
imf->compress= rd->quality;
imf->quality= rd->quality;
/* we know no data loss happens here, the old values were in char range */
imf->imtype= (char)rd->imtype;
imf->planes= (char)rd->planes;
imf->compress= (char)rd->quality;
imf->quality= (char)rd->quality;
/* default, was stored in multiple places, may override later */
imf->depth= R_IMF_CHAN_DEPTH_8;

@ -2410,7 +2410,7 @@ UvElementMap *EM_make_uv_element_map(EditMesh *em, int selected, int do_islands)
vmap->totalUVs = totuv;
for(efa = em->faces.first; efa; a++, efa = efa->next) {
for(efa = em->faces.first; efa; efa = efa->next) {
if(!selected || ((!efa->h) && (efa->f & SELECT))) {
nverts = (efa->v4)? 4: 3;

@ -94,9 +94,6 @@ static PyStructSequence_Desc app_info_desc = {
(sizeof(app_info_fields) / sizeof(PyStructSequence_Field)) - 1
};
#define DO_EXPAND(VAL) VAL ## 1
#define EXPAND(VAL) DO_EXPAND(VAL)
static PyObject *make_app_info(void)
{
PyObject *app_info;
@ -119,11 +116,7 @@ static PyObject *make_app_info(void)
SetObjItem(PyUnicode_FromFormat("%d.%02d (sub %d)",
BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION));
#if defined(BLENDER_VERSION_CHAR) && EXPAND(BLENDER_VERSION_CHAR) != 1
SetStrItem(STRINGIFY(BLENDER_VERSION_CHAR));
#else
SetStrItem("");
#endif
SetStrItem(STRINGIFY(BLENDER_VERSION_CYCLE));
SetStrItem(BLI_program_path());
SetObjItem(PyBool_FromLong(G.background));

@ -206,7 +206,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens)
maxz*= lar->sh_zfac;
maxy= lar->imat[0][1]*p1[0]+lar->imat[1][1]*p1[1]+lar->imat[2][1]*p1[2];
if( fabsf(nray[2]) < FLT_EPSILON ) use_yco= 1;
if( fabs(nray[2]) < FLT_EPSILON ) use_yco= 1;
}
/* scale z to make sure volume is normalized */