warning cleanup.

- fix mistake with grease pencil UI (&& was intended but & used).
- use (void) rather then () across _all_ blenders code.
- a few minor edits, don't shadow stack variables in roll calculation & avoid running memset() for VBO vertex map.
This commit is contained in:
Campbell Barton 2011-02-13 15:02:21 +00:00
parent 0852278ce7
commit 59f1640ae5
22 changed files with 34 additions and 36 deletions

@ -2390,7 +2390,7 @@ void BKE_ptcache_set_continue_physics(Main *bmain, Scene *scene, int enable)
}
}
int BKE_ptcache_get_continue_physics()
int BKE_ptcache_get_continue_physics(void)
{
return CONTINUE_PHYSICS;
}

@ -88,7 +88,7 @@ void texttool_text_set_active(Text *text) {
activeToolText = text;
}
void texttool_text_clear() {
void texttool_text_clear(void) {
free_texttools();
activeToolText = NULL;
}

@ -520,7 +520,7 @@ struct ThreadQueue {
int nowait;
};
ThreadQueue *BLI_thread_queue_init()
ThreadQueue *BLI_thread_queue_init(void)
{
ThreadQueue *queue;

@ -2198,10 +2198,8 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
mul_m3_v3(imat, vec);
}
else if (type==5) {
bArmature *arm= ob->data;
EditBone *ebone= (EditBone *)arm->act_edbone;
float mat[3][3], nor[3];
ebone= (EditBone *)arm->act_edbone;
if(ebone==NULL) {
BKE_report(op->reports, RPT_ERROR, "No active bone set");
return OPERATOR_CANCELLED;

@ -205,7 +205,7 @@ void REEB_freeGraph(ReebGraph *rg)
MEM_freeN(rg);
}
ReebGraph * newReebGraph()
ReebGraph * newReebGraph(void)
{
ReebGraph *rg;
rg = MEM_callocN(sizeof(ReebGraph), "reeb graph");

@ -141,7 +141,7 @@ static void gp_drawui_layer (uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl)
uiItemL(subrow, name, ICON_NULL);
/* delete button (only if hidden but not locked!) */
if ((gpl->flag & GP_LAYER_HIDE) & !(gpl->flag & GP_LAYER_LOCKED)) {
if ((gpl->flag & GP_LAYER_HIDE) && !(gpl->flag & GP_LAYER_LOCKED)) {
/* right-align ............................... */
subrow= uiLayoutRow(row, 1);
uiLayoutSetAlignment(subrow, UI_LAYOUT_ALIGN_RIGHT);

@ -80,17 +80,17 @@ static void ui_free_but(const bContext *C, uiBut *but);
/* ************* translation ************** */
int ui_translate_buttons()
int ui_translate_buttons(void)
{
return (U.transopts & USER_TR_BUTTONS);
}
int ui_translate_menus()
int ui_translate_menus(void)
{
return (U.transopts & USER_TR_MENUS);
}
int ui_translate_tooltips()
int ui_translate_tooltips(void)
{
return (U.transopts & USER_TR_TOOLTIPS);
}

@ -705,7 +705,7 @@ ListBase *UI_iconfile_list(void)
}
void UI_icons_free()
void UI_icons_free(void)
{
if(icongltex.id) {
glDeleteTextures(1, &icongltex.id);

@ -765,7 +765,7 @@ void bglBegin(int mode)
}
}
int bglPointHack() {
int bglPointHack(void) {
float value[4];
int pointhack_px;
glGetFloatv(GL_POINT_SIZE_RANGE, value);

@ -395,7 +395,7 @@ void filelist_free_icons(void)
}
//-----------------FOLDERLIST (previous/next) --------------//
struct ListBase* folderlist_new()
struct ListBase* folderlist_new(void)
{
ListBase* p = MEM_callocN( sizeof(ListBase), "folderlist" );
return p;

@ -347,7 +347,7 @@ float file_string_width(const char* str)
return BLF_width(style->widget.uifont_id, str);
}
float file_font_pointsize()
float file_font_pointsize(void)
{
#if 0
float s;

@ -98,7 +98,7 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
return 1;
}
void text_pop_suggest_list()
void text_pop_suggest_list(void)
{
SuggItem *item, *sel;
int *top, i;

@ -4042,7 +4042,7 @@ static void p_smooth(PChart *chart)
/* Exported */
ParamHandle *param_construct_begin()
ParamHandle *param_construct_begin(void)
{
PHandle *handle = MEM_callocN(sizeof*handle, "PHandle");
handle->construction_chart = p_chart_new(handle);

@ -65,7 +65,7 @@ static GPUBufferPool *globalPool = 0;
static int GLStates = 0;
static GPUAttrib attribData[MAX_GPU_ATTRIB_DATA] = { { -1, 0, 0 } };
GPUBufferPool *GPU_buffer_pool_new()
GPUBufferPool *GPU_buffer_pool_new(void)
{
GPUBufferPool *pool;
@ -1514,7 +1514,7 @@ void GPU_interleaved_attrib_setup( GPUBuffer *buffer, GPUAttrib data[], int numd
}
void GPU_buffer_unbind()
void GPU_buffer_unbind(void)
{
int i;
DEBUG_VBO("GPU_buffer_unbind\n");

@ -82,12 +82,12 @@ int GPU_type_matches(GPUDeviceType device, GPUOSType os, GPUDriverType driver)
/* GPU Extensions */
void GPU_extensions_disable()
void GPU_extensions_disable(void)
{
GG.extdisabled = 1;
}
void GPU_extensions_init()
void GPU_extensions_init(void)
{
GLint r, g, b;
const char *vendor, *renderer;
@ -183,12 +183,12 @@ void GPU_extensions_init()
#endif
}
int GPU_glsl_support()
int GPU_glsl_support(void)
{
return !GG.extdisabled && GG.glslsupport;
}
int GPU_non_power_of_two_support()
int GPU_non_power_of_two_support(void)
{
/* Exception for buggy ATI/Apple driver in Mac OS X 10.5/10.6,
* they claim to support this but can cause system freeze */
@ -201,7 +201,7 @@ int GPU_non_power_of_two_support()
return GLEW_ARB_texture_non_power_of_two;
}
int GPU_color_depth()
int GPU_color_depth(void)
{
return GG.colordepth;
}
@ -680,7 +680,7 @@ struct GPUFrameBuffer {
GPUTexture *depthtex;
};
GPUFrameBuffer *GPU_framebuffer_create()
GPUFrameBuffer *GPU_framebuffer_create(void)
{
GPUFrameBuffer *fb;
@ -825,7 +825,7 @@ void GPU_framebuffer_free(GPUFrameBuffer *fb)
MEM_freeN(fb);
}
void GPU_framebuffer_restore()
void GPU_framebuffer_restore(void)
{
if (GG.currentfb != 0) {
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);

@ -458,7 +458,7 @@ static MEM_CacheLimiterC **get_imbuf_cache_limiter(void)
return &c;
}
void IMB_free_cache_limiter()
void IMB_free_cache_limiter(void)
{
delete_MEM_CacheLimiter(*get_imbuf_cache_limiter());
*get_imbuf_cache_limiter() = 0;

@ -228,7 +228,7 @@ static int thumbpath_from_uri(const char* uri, char* path, const int path_len, T
return rv;
}
void IMB_thumb_makedirs()
void IMB_thumb_makedirs(void)
{
char tpath[FILE_MAX];
if (get_thumb_dir(tpath, THB_NORMAL)) {

@ -1679,7 +1679,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
dfunc->gencall= funcname;
}
static void rna_auto_types()
static void rna_auto_types(void)
{
StructDefRNA *ds;
PropertyDefRNA *dp;

@ -61,7 +61,7 @@ const PointerRNA PointerRNA_NULL= {{0}};
/* Init/Exit */
void RNA_init()
void RNA_init(void)
{
StructRNA *srna;
PropertyRNA *prop;
@ -77,7 +77,7 @@ void RNA_init()
}
}
void RNA_exit()
void RNA_exit(void)
{
StructRNA *srna;

@ -412,7 +412,7 @@ static int rna_validate_identifier(const char *identifier, char *error, int prop
/* Blender Data Definition */
BlenderRNA *RNA_create()
BlenderRNA *RNA_create(void)
{
BlenderRNA *brna;

@ -54,7 +54,7 @@ static RenderEngineType internal_game_type = {
ListBase R_engines = {NULL, NULL};
void RE_engines_init()
void RE_engines_init(void)
{
BLI_addtail(&R_engines, &internal_render_type);
#ifdef WITH_GAMEENGINE
@ -62,7 +62,7 @@ void RE_engines_init()
#endif
}
void RE_engines_exit()
void RE_engines_exit(void)
{
RenderEngineType *type, *next;

@ -1155,12 +1155,12 @@ void WM_setprefsize(int stax, int stay, int sizx, int sizy)
}
/* for borderless and border windows set from command-line */
void WM_setinitialstate_fullscreen()
void WM_setinitialstate_fullscreen(void)
{
initialstate= GHOST_kWindowStateFullScreen;
}
void WM_setinitialstate_normal()
void WM_setinitialstate_normal(void)
{
initialstate= GHOST_kWindowStateNormal;
}