misc warning fixes and one fix for a big in curve allocation

This commit is contained in:
2007-12-13 15:06:02 +00:00
parent 6d6f5bbc1a
commit f15956356c
9 changed files with 15 additions and 18 deletions

View File

@@ -1480,7 +1480,7 @@ void makeBevelList(Object *ob)
while(nu) {
if(nu->pntsu<=1) {
bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelList");
bl= MEM_callocN(sizeof(BevList)+1*sizeof(BevPoint), "makeBevelList");
BLI_addtail(&(cu->bev), bl);
bl->nr= 0;
} else {
@@ -1490,8 +1490,7 @@ void makeBevelList(Object *ob)
resolu= nu->resolu;
if((nu->type & 7)==CU_POLY) {
len= nu->pntsu;
bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelList");
BLI_addtail(&(cu->bev), bl);

View File

@@ -368,7 +368,7 @@ void BLI_setInterruptCallBack(int (*f)(void));
char *BLI_strcasestr(const char *s, const char *find);
int BLI_strcasecmp(const char *s1, const char *s2);
int BLI_strncasecmp(const char *s1, const char *s2, int n);
void BLI_timestr(double time, char *str);
void BLI_timestr(double _time, char *str); /* time var is global */
/**
* Trick to address 32 GB with an int (only for malloced pointers)

View File

@@ -1621,13 +1621,13 @@ void BLI_string_to_utf8(char *original, char *utf_8, char *code)
}
#endif // WITH_ICONV
void BLI_timestr(double time, char *str)
void BLI_timestr(double _time, char *str)
{
/* format 00:00:00.00 (hr:min:sec) string has to be 12 long */
int hr= ((int) time) / (60*60);
int min= ( ((int) time) / 60 ) % 60;
int sec= ((int) (time)) % 60;
int hun= ((int) (time * 100.0)) % 100;
int hr= ( (int) _time) / (60*60);
int min= (((int) _time) / 60 ) % 60;
int sec= ( (int) (_time)) % 60;
int hun= ( (int) (_time * 100.0)) % 100;
if (hr) {
sprintf(str, "%.2d:%.2d:%.2d.%.2d",hr,min,sec,hun);

View File

@@ -287,7 +287,7 @@ static PyObject *M_Geometry_ClosestPointOnLine( PyObject * self, PyObject * args
VectorObject *pt, *line_1, *line_2;
float pt_in[3], pt_out[3], l1[3], l2[3];
float lambda;
PyObject *ret, *val1, *val2;
PyObject *ret;
if( !PyArg_ParseTuple ( args, "O!O!O!",
&vector_Type, &pt,

View File

@@ -41,6 +41,7 @@
#include <BKE_main.h>
#include <BKE_curve.h>
#include <BKE_library.h>
#include <BKE_utildefines.h>
#include "BIF_space.h"
#include "Ipocurve.h"
@@ -60,9 +61,6 @@
#define KEY_TYPE_CURVE 1
#define KEY_TYPE_LATTICE 2
/* macro from blenkernel/intern/key.c:98 */
#define GS(a) (*((short *)(a)))
static int Key_compare( BPy_Key * a, BPy_Key * b );
static PyObject *Key_repr( BPy_Key * self );
static void Key_dealloc( BPy_Key * self );

View File

@@ -536,7 +536,7 @@ static int Sequence_setImages( BPy_Sequence * self, PyObject *value )
Strip *strip;
StripElem *se;
int i;
PyObject *list, *item;
PyObject *list;
char *basepath, *name;
if (self->seq->type != SEQ_IMAGE) {

View File

@@ -3438,7 +3438,7 @@ static void sb_clear_cache(void *ob_v, void *actsoft_v)
static void object_softbodies(Object *ob)
{
SoftBody *sb=ob->soft;
ParticleSystem *psys;
ParticleSystem *psys=NULL;
uiBlock *block;
uiBut *but;
static int val;
@@ -3471,7 +3471,7 @@ static void object_softbodies(Object *ob)
MEM_freeN(menustr);
}
if(psys_cur){
if(psys_cur && psys){
if(*softflag & OB_SB_ENABLE)
val=1;
else

View File

@@ -173,8 +173,8 @@ float BIF_GetStringWidth(BMF_Font* font, char *str, int translate)
}
void BIF_GetBoundingBox(struct BMF_Font* font, char* str, int translate, rctf *bbox){
float dummy;
#ifdef INTERNATIONAL
float dummy;
if(G.ui_international == TRUE)
if(translate && (U.transopts & USER_TR_BUTTONS))
FTF_GetBoundingBox(str, &bbox->xmin, &bbox->ymin, &dummy, &bbox->xmax, &bbox->ymax, &dummy, FTF_USE_GETTEXT | FTF_INPUT_UTF8);

View File

@@ -1154,7 +1154,7 @@ void pose_relax()
int do_loc = 0;
int do_quat = 0;
int flag = 0;*/
int do_w, do_x, do_y, do_z;
int do_x, do_y, do_z;
if (!ob) return;