Repository: godotengine/godot
File: scene/gui/tab_container.cpp (C++)

Code before:
				if (tab.has_title) {
					set_tab_title(i, tab.title);
				}
				set_tab_icon(i, tab.icon);
				set_tab_disabled(i, tab.disabled);
				set_tab_hidden(i, tab.hidden);
			}
			pending_tabs.clear();

			[[fallthrough]];
		}

		case NOTIFICATION_RESIZED: {
			_update_margins();
		} break;

		case NOTIFICATION_DRAW: {
			RID canvas = get_canvas_item();
			Size2 size = get_size();

			// Draw only the tab area if the header is hidden.
			if (!tabs_visible) {
				theme_cache.panel_style->draw(canvas, Rect2(0, 0, size.width, size.height));
				return;
			}
			Rect2 tabbar_rect = _get_tab_rect();
			int header_height = _get_tab_height();
			int header_voffset = int(tabs_position == POSITION_BOTTOM) * (size.height - header_height);

			// Draw background for the tabbar.
			theme_cache.tabbar_style->draw(canvas, Rect2(0, header_voffset, size.width, header_height));
			// Draw the background for the tab's content.
			theme_cache.panel_style->draw(canvas, Rect2(0, int(tabs_position == POSITION_TOP) * header_height, size.width, size.height - header_height));
		} break;

		case NOTIFICATION_VISIBILITY_CHANGED: {
			if (!is_visible()) {
				return;
			}

			updating_visibility = true;

			// As the visibility change notification will be triggered for all children soon after,
			// beat it to the punch and make sure that the correct node is the only one visible first.
			// Otherwise, it can prevent a tab change done right before this container was made visible.
			Vector<Control *> controls = _get_tab_controls();
			int current = setup_current_tab > -2 ? setup_current_tab : get_current_tab();
			for (int i = 0; i < controls.size(); i++) {
				controls[i]->set_visible(i == current);
			}


Review comment (suggestion):
It seems that `tabbar_rect` is a unused variable which leads to errors when the CI is building. Could you take a look at it?
Error message:
```
scene/gui/tab_container.cpp:177:31: error: variable 'tabbar_rect' set but not used [-Werror=unused-but-set-variable]
  177 |                         Rect2 tabbar_rect = _get_tab_rect();
```

Code after:

		case NOTIFICATION_RESIZED: {
			_update_margins();
		} break;

		case NOTIFICATION_DRAW: {
			RID canvas = get_canvas_item();
			Size2 size = get_size();

			// Draw only the tab area if the header is hidden.
			if (!tabs_visible) {
				theme_cache.panel_style->draw(canvas, Rect2(0, 0, size.width, size.height));
				return;
			}
			int header_height = _get_tab_height();
			int header_voffset = int(tabs_position == POSITION_BOTTOM) * (size.height - header_height);

			// Draw background for the tabbar.
			theme_cache.tabbar_style->draw(canvas, Rect2(0, header_voffset, size.width, header_height));
			// Draw the background for the tab's content.
			theme_cache.panel_style->draw(canvas, Rect2(0, int(tabs_position == POSITION_TOP) * header_height, size.width, size.height - header_height));
		} break;

		case NOTIFICATION_VISIBILITY_CHANGED: {
			if (!is_visible()) {
				return;
			}

			updating_visibility = true;

			// As the visibility change notification will be triggered for all children soon after,
			// beat it to the punch and make sure that the correct node is the only one visible first.
			// Otherwise, it can prevent a tab change done right before this container was made visible.
			Vector<Control *> controls = _get_tab_controls();
			int current = setup_current_tab > -2 ? setup_current_tab : get_current_tab();
			for (int i = 0; i < controls.size(); i++) {
				controls[i]->set_visible(i == current);
			}

			updating_visibility = false;
		} break;

		case NOTIFICATION_TRANSLATION_CHANGED:
		case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
			if (popup_button) {
				popup_button->set_button_icon(theme_cache.menu_icon);
				internal_container->move_child(popup_button, is_layout_rtl() ? 0 : 1);
			}
			_update_margins();
		} break;