fix for crash introduced r33257, also tag some vars as unused.

This commit is contained in:
Campbell Barton 2010-11-24 20:13:37 +00:00
parent 6f71d575bf
commit c5f7207948
4 changed files with 6 additions and 6 deletions

@ -86,7 +86,7 @@ volatile static struct mmapListBase *mmapbase = &_mmapbase;
/* --------------------------------------------------------------------- */
/* mmap for windows */
void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset)
void *mmap(void *UNUSED(start), size_t len, int prot, int flags, int fd, off_t offset)
{
HANDLE fhandle = INVALID_HANDLE_VALUE;
HANDLE maphandle;
@ -151,7 +151,7 @@ void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset)
}
/* munmap for windows */
intptr_t munmap(void *ptr, intptr_t size)
intptr_t munmap(void *ptr, intptr_t UNUSED(size))
{
MemMap *mm = mmap_findlink(mmapbase, ptr);
if (!mm) {

@ -218,7 +218,7 @@ int BLI_copy_fileops(const char *file, const char *to) {
return err;
}
int BLI_link(const char *file, const char *to) {
int BLI_link(const char *UNUSED(file), const char *UNUSED(to)) {
callLocalErrorCallBack("Linking files is unsupported on Windows");
return 1;

@ -2526,7 +2526,7 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
UI_ThemeColor(TH_TEXT_HI);
if(v3d->grid != 1.0f) {
BLI_snprintf(tstr, sizeof(tstr), "%s x %.4g", v3d->grid, grid_unit);
BLI_snprintf(tstr, sizeof(tstr), "%s x %.4g", grid_unit, v3d->grid);
}
BLF_draw_default(22, ar->winy-(USER_SHOW_VIEWPORTNAME?40:20), 0.0f, tstr[0]?tstr : grid_unit, sizeof(tstr)); /* XXX, use real length */

@ -2041,7 +2041,7 @@ static void WM_OT_quit_blender(wmOperatorType *ot)
/* *********************** */
#if defined(WIN32)
static int console= 1;
void WM_toggle_console(bContext *C, short show)
void WM_toggle_console(bContext *UNUSED(C), short show)
{
if(show) {
ShowWindow(GetConsoleWindow(),SW_SHOW);
@ -2053,7 +2053,7 @@ void WM_toggle_console(bContext *C, short show)
}
}
static int wm_toggle_console_op(bContext *C, wmOperator *op)
static int wm_toggle_console_op(bContext *C, wmOperator *UNUSED(op))
{
if(console) {
WM_toggle_console(C, 0);