diff --git a/intern/ghost/intern/GHOST_WindowNULL.hh b/intern/ghost/intern/GHOST_WindowNULL.hh index 7e302b1ee88..3548021083f 100644 --- a/intern/ghost/intern/GHOST_WindowNULL.hh +++ b/intern/ghost/intern/GHOST_WindowNULL.hh @@ -22,7 +22,7 @@ class GHOST_WindowNULL : public GHOST_Window { return GHOST_kSuccess; } - GHOST_WindowNULL(const char *title, + GHOST_WindowNULL(const char * /*title*/, int32_t /*left*/, int32_t /*top*/, uint32_t width, @@ -33,7 +33,6 @@ class GHOST_WindowNULL : public GHOST_Window { const bool stereoVisual) : GHOST_Window(width, height, state, stereoVisual, false) { - setTitle(title); } protected: diff --git a/source/blender/blenlib/intern/math_half.cc b/source/blender/blenlib/intern/math_half.cc index 0df78c4362f..e5b3286f456 100644 --- a/source/blender/blenlib/intern/math_half.cc +++ b/source/blender/blenlib/intern/math_half.cc @@ -64,7 +64,7 @@ uint16_t blender::math::float_to_half(float v) uint32_t mant_odd = (f.u >> 13) & 1; /* resulting mantissa is odd */ /* update exponent, rounding bias part 1 */ - f.u += ((uint32_t)(15 - 127) << 23) + 0xfff; + f.u += (uint32_t(15 - 127) << 23) + 0xfff; /* rounding bias part 2 */ f.u += mant_odd; /* take the bits! */ diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index 17e1fb25a48..4c42dd616f6 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -2272,8 +2272,6 @@ static void lib_link_scenes_check_set(Main *bmain) static void direct_link_library(FileData *fd, Library *lib, Main *main) { - Main *newmain; - /* Make sure we have full path in lib->runtime.filepath_abs */ /* NOTE: Since existing libraries are searched by their absolute path, this has to be generated * before the lookup below. Otherwise, in case the stored absolute filepath is not 'correct' (may @@ -2321,7 +2319,7 @@ static void direct_link_library(FileData *fd, Library *lib, Main *main) BKE_packedfile_blend_read(&reader, &lib->packedfile, lib->filepath); /* new main */ - newmain = BKE_main_new(); + Main *newmain = BKE_main_new(); BLI_addtail(fd->mainlist, newmain); newmain->curlib = lib; diff --git a/source/blender/editors/space_text/text_autocomplete.cc b/source/blender/editors/space_text/text_autocomplete.cc index b7fe565415f..2c7554b7e55 100644 --- a/source/blender/editors/space_text/text_autocomplete.cc +++ b/source/blender/editors/space_text/text_autocomplete.cc @@ -521,9 +521,9 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e ED_area_tag_redraw(area); } - // if (swallow) { - // retval = OPERATOR_RUNNING_MODAL; - // } + if (swallow) { + // retval = OPERATOR_RUNNING_MODAL; + } if (texttool_suggest_first()) { if (retval != OPERATOR_RUNNING_MODAL) { diff --git a/source/blender/editors/space_text/text_draw.cc b/source/blender/editors/space_text/text_draw.cc index 83fb906e5ce..50abab92025 100644 --- a/source/blender/editors/space_text/text_draw.cc +++ b/source/blender/editors/space_text/text_draw.cc @@ -1170,7 +1170,6 @@ static void draw_text_decoration(SpaceText *st, ARegion *region) Text *text = st->text; int vcurl, vcurc, vsell, vselc; bool hidden = false; - int x, y, w, i; int offl, offc; const int lheight = TXT_LINE_HEIGHT(st); @@ -1206,8 +1205,8 @@ static void draw_text_decoration(SpaceText *st, ARegion *region) immUniformThemeColor(TH_SHADE2); - x = TXT_BODY_LEFT(st); - y = region->winy; + int x = TXT_BODY_LEFT(st); + int y = region->winy; if (st->flags & ST_SCROLL_SELECT) { y += st->runtime->scroll_ofs_px[1]; } @@ -1252,7 +1251,7 @@ static void draw_text_decoration(SpaceText *st, ARegion *region) pos, x + fromc * st->runtime->cwidth_px - U.pixelsize, y, region->winx, y - lheight); y -= lheight; - for (i = froml + 1; i < tol; i++) { + for (int i = froml + 1; i < tol; i++) { immRecti(pos, x - U.pixelsize, y, region->winx, y - lheight); y -= lheight; } @@ -1262,6 +1261,8 @@ static void draw_text_decoration(SpaceText *st, ARegion *region) } y -= lheight; } + /* Quiet warnings. */ + UNUSED_VARS(x, y); } if (st->line_hlight) { @@ -1299,8 +1300,8 @@ static void draw_text_decoration(SpaceText *st, ARegion *region) if (!hidden) { /* Draw the cursor itself (we draw the sel. cursor as this is the leading edge) */ - x = TXT_BODY_LEFT(st) + (vselc * st->runtime->cwidth_px); - y = region->winy - vsell * lheight; + int x = TXT_BODY_LEFT(st) + (vselc * st->runtime->cwidth_px); + int y = region->winy - vsell * lheight; if (st->flags & ST_SCROLL_SELECT) { y += st->runtime->scroll_ofs_px[1]; } @@ -1311,7 +1312,7 @@ static void draw_text_decoration(SpaceText *st, ARegion *region) char ch = text->sell->line[text->selc]; y += TXT_LINE_SPACING(st); - w = st->runtime->cwidth_px; + int w = st->runtime->cwidth_px; if (ch == '\t') { w *= st->tabnumber - (vselc + st->left) % st->tabnumber; } diff --git a/source/blender/windowmanager/intern/wm_event_query.cc b/source/blender/windowmanager/intern/wm_event_query.cc index 1739b0bd59f..c7d3a999ed1 100644 --- a/source/blender/windowmanager/intern/wm_event_query.cc +++ b/source/blender/windowmanager/intern/wm_event_query.cc @@ -57,6 +57,7 @@ static void event_ids_from_flag(char *str, } } ofs += BLI_strncpy_rlen(str + ofs, "}", str_maxncpy - ofs); + UNUSED_VARS(ofs); /* Quiet warning. */ } static void event_ids_from_type_and_value(const short type,