diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-18 01:27:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-18 01:27:15 +0300 |
commit | aeb2225a287e68d8ee03861bec112ce3459a468a (patch) | |
tree | 2fa2f308e233fc89b6a93aeca57d3a9daf828ecc /source/blender | |
parent | d52400bfbd2a7e4d09b5a71bc461a554d232af15 (diff) |
2.50: some warning fixes.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_ipo.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/seqeffects.c | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 5 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 1 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_header.c | 30 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 5 | ||||
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 1 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_opwrapper.c | 23 | ||||
-rw-r--r-- | source/blender/yafray/intern/export_ri.cpp | 0 |
11 files changed, 19 insertions, 59 deletions
diff --git a/source/blender/blenkernel/BKE_ipo.h b/source/blender/blenkernel/BKE_ipo.h index a3f451438bd..e12170b73c9 100644 --- a/source/blender/blenkernel/BKE_ipo.h +++ b/source/blender/blenkernel/BKE_ipo.h @@ -38,7 +38,7 @@ extern "C" { struct Main; struct Ipo; -void do_versions_ipo_to_animato(struct Main *main); +void do_versions_ipos_to_animato(struct Main *main); /* --------------------- xxx stuff ------------------------ */ diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index 9ea115903b0..2ee95ed928e 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -1038,8 +1038,8 @@ static void do_gammacross_effect(Sequence * seq,int cfra, } else { do_gammacross_effect_byte( facf0, facf1, x, y, - (char*) ibuf1->rect, (char*) ibuf2->rect, - (char*) out->rect); + (unsigned char*) ibuf1->rect, (unsigned char*) ibuf2->rect, + (unsigned char*) out->rect); } } @@ -1996,7 +1996,7 @@ static void do_transform(Sequence * seq,float facf0, int x, int y, float xs,ys,factxScale,factyScale,tx,ty,rad,s,c,xaux,yaux,factRot,px,py; TransformVars *scale; - struct RenderData *rd = NULL; // XXX 2.5 global: &G.scene->r; + // XXX struct RenderData *rd = NULL; // 2.5 global: &G.scene->r; scale = (TransformVars *)seq->effectdata; diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index d3570808d6d..9204ab18bfa 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -334,7 +334,6 @@ void BLI_adddirstrings() char size[250]; static char * types[8] = {"---", "--x", "-w-", "-wx", "r--", "r-x", "rw-", "rwx"}; int num, mode; - off_t num1, num2, num3, num4, num5; #ifdef WIN32 __int64 st_size; #else @@ -403,10 +402,10 @@ void BLI_adddirstrings() st_size= (off_t)files[num].s.st_size; if (st_size > 1024*1024*1024) { - sprintf(files[num].size, "%.2f GB", st_size/(1024*1024*1024)); + sprintf(files[num].size, "%.2f GB", ((double)st_size)/(1024*1024*1024)); } else if (st_size > 1024*1024) { - sprintf(files[num].size, "%.1f MB", st_size/(1024*1024)); + sprintf(files[num].size, "%.1f MB", ((double)st_size)/(1024*1024)); } else if (st_size > 1024) { sprintf(files[num].size, "%d KB", (int)(st_size/1024)); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 6dde367ff1b..5c481652db1 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -702,9 +702,6 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space) void ED_area_swapspace(bContext *C, ScrArea *sa1, ScrArea *sa2) { - SpaceType *st; - SpaceLink *sl; - SpaceLink *slold; ScrArea *tmp= MEM_callocN(sizeof(ScrArea), "addscrarea"); ED_area_exit(C, sa1); diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 971a0b3ad06..c65c486d4bb 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -550,7 +550,6 @@ void file_draw_list(const bContext *C, ARegion *ar) static void file_draw_fsmenu_category(const bContext *C, ARegion *ar, FSMenuCategory category, const char* category_name, short *starty) { - SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C); struct FSMenu* fsmenu = fsmenu_get(); char bookmark[FILE_MAX]; int nentries = fsmenu_get_nentries(fsmenu, category); diff --git a/source/blender/editors/space_file/file_header.c b/source/blender/editors/space_file/file_header.c index b9d6c7f7c10..54dd7ff15ba 100644 --- a/source/blender/editors/space_file/file_header.c +++ b/source/blender/editors/space_file/file_header.c @@ -67,36 +67,6 @@ /* ************************ header area region *********************** */ -static void do_viewmenu(bContext *C, void *arg, int event) -{ -} - -static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused) -{ - ScrArea *curarea= CTX_wm_area(C); - uiBlock *block; - short yco= 0, menuwidth=120; - - block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP, UI_HELV); - uiBlockSetButmFunc(block, do_viewmenu, NULL); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20, - menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); - - if(curarea->headertype==HEADERTOP) { - uiBlockSetDirection(block, UI_DOWN); - } - else { - uiBlockSetDirection(block, UI_TOP); - uiBlockFlipOrder(block); - } - - uiTextBoundsBlock(block, 50); - uiEndBlock(C, block); - - return block; -} - static void do_file_header_buttons(bContext *C, void *arg, int event) { SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index e38aed07577..1ba84566940 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -274,7 +274,6 @@ static int compare_extension(const void *a1, const void *a2) { void filelist_filter(FileList* filelist) { - char dir[FILE_MAX], group[GROUP_MAX]; int num_filtered = 0; int i, j; @@ -667,7 +666,6 @@ int filelist_column_len(struct FileList* filelist, FileListColumns column) void filelist_readdir(struct FileList* filelist) { char wdir[FILE_MAX]; - int finished = 0; int i; if (!filelist) return; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 239e819c6de..f98c5bf17dd 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -78,11 +78,6 @@ static int text_new_poll(bContext *C) return 1; } -static int text_valid_poll(bContext *C) -{ - return CTX_data_edit_text(C) ? 1:0; -} - static int text_edit_poll(bContext *C) { Text *text= CTX_data_edit_text(C); diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 3e618a483e3..e723609f3ae 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -861,7 +861,6 @@ static const char *exr_rgba_channelname(InputFile *file, const char *chan) for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) { - const Channel &channel = i.channel(); const char *str= i.name(); int len= strlen(str); if(len) { diff --git a/source/blender/python/intern/bpy_opwrapper.c b/source/blender/python/intern/bpy_opwrapper.c index 727dee01531..328864ac8b8 100644 --- a/source/blender/python/intern/bpy_opwrapper.c +++ b/source/blender/python/intern/bpy_opwrapper.c @@ -299,6 +299,7 @@ void PYTHON_OT_wrapper(wmOperatorType *ot, void *userdata) { PyOperatorType *pyot = (PyOperatorType *)userdata; PyObject *py_class = pyot->py_class; + PyObject *props, *item; /* identifiers */ ot->name= pyot->name; @@ -316,7 +317,6 @@ void PYTHON_OT_wrapper(wmOperatorType *ot, void *userdata) ot->pyop_data= userdata; // TODO - set properties - PyObject *props, *item; if ((props=PyObject_GetAttrString(py_class, "properties"))) { @@ -325,9 +325,9 @@ void PYTHON_OT_wrapper(wmOperatorType *ot, void *userdata) int i; for(i=0; i<PyList_Size(props); i++) { - item = PyList_GET_ITEM(props, i); - PyObject *py_func_ptr, *py_kw, *py_srna_cobject, *py_ret; + + item = PyList_GET_ITEM(props, i); if (PyArg_ParseTuple(item, "O!O!", &PyCObject_Type, &py_func_ptr, &PyDict_Type, &py_kw)) { @@ -372,8 +372,10 @@ PyObject *PYOP_wrap_add(PyObject *self, PyObject *args) char *description= NULL; static char *pyop_func_names[] = {"exec", "invoke", "poll", NULL}; - static int *pyop_func_nargs[] = {1, 2, 2, 0}; + static int pyop_func_nargs[] = {1, 2, 2, 0}; + int i; + int argcount; if (!PyArg_ParseTuple(args, "O", &value) || !PyObject_IsSubclass(value, optype)) { PyErr_SetString( PyExc_AttributeError, "expected Operator subclass of bpy.types.Operator"); @@ -386,7 +388,7 @@ PyObject *PYOP_wrap_add(PyObject *self, PyObject *args) Py_DECREF(item); if (WM_operatortype_find(idname)) { - PyErr_Format( PyExc_AttributeError, "Operator alredy exists with this name", idname); + PyErr_Format( PyExc_AttributeError, "Operator already exists with this name: %s", idname); return NULL; } @@ -412,10 +414,10 @@ PyObject *PYOP_wrap_add(PyObject *self, PyObject *args) Py_DECREF(item); /* Check known functions and argument lengths */ - int i; - int argcount; for (i=0; pyop_func_names[i]; i++) { - if (item=PyObject_GetAttrString(value, pyop_func_names[i])) { + if ((item=PyObject_GetAttrString(value, pyop_func_names[i]))) { + PyObject *pyargcount; + /* check its callable */ if (!PyFunction_Check(item)) { PyErr_Format(PyExc_ValueError, "Cant register operator class - %s.%s() is not a function", idname, pyop_func_names[i]); @@ -425,7 +427,7 @@ PyObject *PYOP_wrap_add(PyObject *self, PyObject *args) /* check the number of args is correct */ // MyClass.exec.func_code.co_argcount - PyObject *pyargcount = PyObject_GetAttrString(PyFunction_GetCode(item), "co_argcount"); + pyargcount = PyObject_GetAttrString(PyFunction_GetCode(item), "co_argcount"); argcount = PyLong_AsSsize_t(pyargcount); Py_DECREF(pyargcount); @@ -444,13 +446,14 @@ PyObject *PYOP_wrap_add(PyObject *self, PyObject *args) /* If we have properties set, check its a list of dicts */ item = PyObject_GetAttrString(value, "properties"); if (item) { + int i; + if (!PyList_Check(item)) { PyErr_Format(PyExc_ValueError, "Cant register operator class - %s.properties must be a list", idname); Py_DECREF(item); return NULL; } - int i; for(i=0; i<PyList_Size(item); i++) { PyObject *py_args = PyList_GET_ITEM(item, i); PyObject *py_func_ptr, *py_kw; /* place holders */ diff --git a/source/blender/yafray/intern/export_ri.cpp b/source/blender/yafray/intern/export_ri.cpp deleted file mode 100644 index e69de29bb2d..00000000000 --- a/source/blender/yafray/intern/export_ri.cpp +++ /dev/null |