Fix various valgrind reported uninitialized variable uses
(cherry picked from commit d702d7b335
)
This commit is contained in:
parent
61a9ef5d81
commit
675899a521
|
@ -309,9 +309,9 @@ class CommandQueueMT {
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t command_mem[COMMAND_MEM_SIZE];
|
uint8_t command_mem[COMMAND_MEM_SIZE];
|
||||||
uint32_t read_ptr;
|
uint32_t read_ptr = 0;
|
||||||
uint32_t write_ptr;
|
uint32_t write_ptr = 0;
|
||||||
uint32_t dealloc_ptr;
|
uint32_t dealloc_ptr = 0;
|
||||||
SyncSemaphore sync_sems[SYNC_SEMAPHORES];
|
SyncSemaphore sync_sems[SYNC_SEMAPHORES];
|
||||||
Mutex *mutex;
|
Mutex *mutex;
|
||||||
Semaphore *sync;
|
Semaphore *sync;
|
||||||
|
|
|
@ -707,6 +707,9 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
|
||||||
channel[i].vu_r->set_min(-80);
|
channel[i].vu_r->set_min(-80);
|
||||||
channel[i].vu_r->set_max(24);
|
channel[i].vu_r->set_max(24);
|
||||||
channel[i].vu_r->set_step(0.1);
|
channel[i].vu_r->set_step(0.1);
|
||||||
|
|
||||||
|
channel[i].peak_l = 0.0f;
|
||||||
|
channel[i].peak_r = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
scale = memnew(TextureRect);
|
scale = memnew(TextureRect);
|
||||||
|
|
|
@ -758,6 +758,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
|
||||||
|
|
||||||
snap_step = Vector2(10, 10);
|
snap_step = Vector2(10, 10);
|
||||||
snap_separation = Vector2(0, 0);
|
snap_separation = Vector2(0, 0);
|
||||||
|
snap_mode = SNAP_NONE;
|
||||||
edited_margin = -1;
|
edited_margin = -1;
|
||||||
drag_index = -1;
|
drag_index = -1;
|
||||||
drag = false;
|
drag = false;
|
||||||
|
|
|
@ -853,6 +853,7 @@ void NativeScriptLanguage::_unload_stuff(bool p_reload) {
|
||||||
|
|
||||||
NativeScriptLanguage::NativeScriptLanguage() {
|
NativeScriptLanguage::NativeScriptLanguage() {
|
||||||
NativeScriptLanguage::singleton = this;
|
NativeScriptLanguage::singleton = this;
|
||||||
|
has_objects_to_register = false;
|
||||||
#ifndef NO_THREADS
|
#ifndef NO_THREADS
|
||||||
mutex = Mutex::create();
|
mutex = Mutex::create();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1145,6 +1145,7 @@ bool OS_X11::is_window_maximized() const {
|
||||||
unsigned long len;
|
unsigned long len;
|
||||||
unsigned long remaining;
|
unsigned long remaining;
|
||||||
unsigned char *data = NULL;
|
unsigned char *data = NULL;
|
||||||
|
bool retval = false;
|
||||||
|
|
||||||
int result = XGetWindowProperty(
|
int result = XGetWindowProperty(
|
||||||
x11_display,
|
x11_display,
|
||||||
|
@ -1173,13 +1174,15 @@ bool OS_X11::is_window_maximized() const {
|
||||||
if (atoms[i] == wm_max_vert)
|
if (atoms[i] == wm_max_vert)
|
||||||
found_wm_max_vert = true;
|
found_wm_max_vert = true;
|
||||||
|
|
||||||
if (found_wm_max_horz && found_wm_max_vert)
|
if (found_wm_max_horz && found_wm_max_vert) {
|
||||||
return true;
|
retval = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
XFree(atoms);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
XFree(data);
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OS_X11::set_borderless_window(bool p_borderless) {
|
void OS_X11::set_borderless_window(bool p_borderless) {
|
||||||
|
|
|
@ -882,4 +882,6 @@ Tabs::Tabs() {
|
||||||
|
|
||||||
min_width = 0;
|
min_width = 0;
|
||||||
scrolling_enabled = true;
|
scrolling_enabled = true;
|
||||||
|
buttons_visible = false;
|
||||||
|
hover = -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3911,6 +3911,8 @@ Tree::Tree() {
|
||||||
cache.click_id = -1;
|
cache.click_id = -1;
|
||||||
cache.click_item = NULL;
|
cache.click_item = NULL;
|
||||||
cache.click_column = 0;
|
cache.click_column = 0;
|
||||||
|
cache.hover_cell = -1;
|
||||||
|
cache.hover_index = -1;
|
||||||
last_keypress = 0;
|
last_keypress = 0;
|
||||||
focus_in_id = 0;
|
focus_in_id = 0;
|
||||||
|
|
||||||
|
|
|
@ -2789,6 +2789,7 @@ Viewport::Viewport() {
|
||||||
gui.drag_preview = NULL;
|
gui.drag_preview = NULL;
|
||||||
gui.drag_attempted = false;
|
gui.drag_attempted = false;
|
||||||
gui.canvas_sort_index = 0;
|
gui.canvas_sort_index = 0;
|
||||||
|
gui.roots_order_dirty = false;
|
||||||
|
|
||||||
msaa = MSAA_DISABLED;
|
msaa = MSAA_DISABLED;
|
||||||
hdr = true;
|
hdr = true;
|
||||||
|
|
Loading…
Reference in New Issue