Page MenuHome

warning-patch.patch

warning-patch.patch

Index: intern/audaspace/intern/AUD_ConverterFunctions.cpp
===================================================================
--- intern/audaspace/intern/AUD_ConverterFunctions.cpp (revision 44172)
+++ intern/audaspace/intern/AUD_ConverterFunctions.cpp (working copy)
@@ -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
Index: intern/audaspace/intern/AUD_JOSResampleReader.cpp
===================================================================
--- intern/audaspace/intern/AUD_JOSResampleReader.cpp (revision 44172)
+++ intern/audaspace/intern/AUD_JOSResampleReader.cpp (working copy)
@@ -200,7 +200,7 @@
left\
}\
\
- P = -P;\
+ P = 0-P;\
\
end = (int_to_fp(m_len) - P) / P_increment - 1;\
if(m_cache_valid - m_n - 2 < end)\
Index: source/blender/avi/AVI_avi.h
===================================================================
--- source/blender/avi/AVI_avi.h (revision 44172)
+++ source/blender/avi/AVI_avi.h (working copy)
@@ -153,16 +153,10 @@
#define AVIIF_KEYFRAME 0x00000010
#define AVIIF_NO_TIME 0x00000100
#define AVIIF_COMPRESSOR 0x0FFF0000
- int Offset;
- int Size;
+ int64_t Offset;
+ int64_t Size;
} AviIndexEntry;
-typedef struct _AviIndex {
- int fcc;
- int size;
- AviIndexEntry *entrys;
-} AviIndex;
-
typedef enum {
AVI_FORMAT_RGB24, /* The most basic of forms, 3 bytes per pixel, 1 per r, g, b */
AVI_FORMAT_RGB32, /* The second most basic of forms, 4 bytes per pixel, 1 per r, g, b, alpha */
Index: source/blender/avi/intern/avi.c
===================================================================
--- source/blender/avi/intern/avi.c (revision 44172)
+++ source/blender/avi/intern/avi.c (working copy)
@@ -727,7 +727,7 @@
AviList list;
AviChunk chunk;
int i;
- int64_t header_pos1, header_pos2;
+ int64_t header_pos1, header_pos2, header_pos_junk;
int64_t stream_pos1, stream_pos2;
movie->type = AVI_MOVIE_WRITE;
@@ -884,10 +884,14 @@
fseek (movie->fp, stream_pos2, SEEK_SET);
}
- if (ftell(movie->fp) < 2024 - 8) {
+ header_pos_junk = ftell(movie->fp);
+
+ if (header_pos_junk < 2024 - 8) {
chunk.fcc = FCC("JUNK");
- chunk.size = 2024-8-ftell(movie->fp);
+ /* pos is known small here, so cast is safe */
+ chunk.size = 2024-8-(int)header_pos_junk;
+
awrite (movie, &chunk, 1, sizeof(AviChunk), movie->fp, AVI_CHUNK);
for (i=0; i < chunk.size; i++)
@@ -1021,7 +1025,8 @@
AviError AVI_close_compress (AviMovie *movie)
{
- int temp, movi_size, i;
+ int64_t temp, movi_size;
+ int i;
fseek (movie->fp, 0L, SEEK_END);
movi_size = ftell (movie->fp);
Index: source/blender/blenkernel/BKE_image.h
===================================================================
--- source/blender/blenkernel/BKE_image.h (revision 44172)
+++ source/blender/blenkernel/BKE_image.h (working copy)
@@ -54,10 +54,10 @@
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);
Index: source/blender/blenkernel/intern/pointcache.c
===================================================================
--- source/blender/blenkernel/intern/pointcache.c (revision 44172)
+++ source/blender/blenkernel/intern/pointcache.c (working copy)
@@ -2285,7 +2285,7 @@
/* 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:
@@ -2302,8 +2302,7 @@
if(timescale) {
time= BKE_curframe(scene);
- nexttime= BKE_frame_to_ctime(scene, CFRA+1);
-
+ nexttime= BKE_frame_to_ctime(scene, (float)(CFRA+1)); /* XXX: jwilkins: should there be an int version of this function? */
*timescale= MAX2(nexttime - time, 0.0f);
}
Index: source/blender/blenlib/BLI_utildefines.h
===================================================================
--- source/blender/blenlib/BLI_utildefines.h (revision 44172)
+++ source/blender/blenlib/BLI_utildefines.h (working copy)
@@ -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__)
Index: source/blender/blenlib/intern/math_color_inline.c
===================================================================
--- source/blender/blenlib/intern/math_color_inline.c (revision 44172)
+++ source/blender/blenlib/intern/math_color_inline.c (working copy)
@@ -163,7 +163,7 @@
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]);
Index: source/blender/blenloader/intern/readfile.c
===================================================================
--- source/blender/blenloader/intern/readfile.c (revision 44172)
+++ source/blender/blenloader/intern/readfile.c (working copy)
@@ -3838,7 +3838,7 @@
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]);
@@ -7492,15 +7492,17 @@
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;
+ /* XXX: jwilkins: these conversions are not safe
+ should there be a check? */
+ 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;
Index: source/blender/editors/mesh/editmesh_lib.c
===================================================================
--- source/blender/editors/mesh/editmesh_lib.c (revision 44172)
+++ source/blender/editors/mesh/editmesh_lib.c (working copy)
@@ -2410,7 +2410,7 @@
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;
Index: source/blender/python/intern/bpy_app.c
===================================================================
--- source/blender/python/intern/bpy_app.c (revision 44172)
+++ source/blender/python/intern/bpy_app.c (working copy)
@@ -94,9 +94,6 @@
(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 @@
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));

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3d/7d/ac04a1b56d69d54a2f3d14a3e090

Event Timeline