summaryrefslogtreecommitdiff
path: root/servers/audio/effects/eq.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/audio/effects/eq.cpp')
-rw-r--r--servers/audio/effects/eq.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/servers/audio/effects/eq.cpp b/servers/audio/effects/eq.cpp
index e8f247d3bc..426f178dcb 100644
--- a/servers/audio/effects/eq.cpp
+++ b/servers/audio/effects/eq.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -103,7 +103,9 @@ void EQ::recalculate_band_coefficients() {
//printf("band %i, precoefs = %f,%f,%f\n",i,c2a,c2b,c2c);
- double r1, r2; //roots
+ // Default initializing to silence compiler warning about potential uninitialized use.
+ // Both variables are properly set in _solve_quadratic before use, or we continue if roots == 0.
+ double r1 = 0, r2 = 0; //roots
int roots = solve_quadratic(c2a, c2b, c2c, &r1, &r2);
ERR_CONTINUE(roots == 0);