Pārlūkot izejas kodu

Fix some more warnings reported by CI

Fixes the following Clang 7 warnings:
```
core/io/marshalls.cpp:872:10: warning: unused variable 'f' [-Wunused-variable]

core/ustring.cpp:1831:2: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
core/ustring.cpp:1832:2: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]

drivers/gles3/rasterizer_gles3.cpp:82:24: warning: unused function '_gl_debug_print' [-Wunused-function,34]

main/main.cpp:118:13: warning: unused variable 'auto_build_solutions' [-Wunused-variable]

modules/csg/csg_gizmos.cpp:225:46: warning: 'current' may be used uninitialized in this function [-Wmaybe-uninitialized]
```
Rémi Verschelde 6 gadi atpakaļ
vecāks
revīzija
6ab78d9ffb

+ 0 - 2
core/io/marshalls.cpp

@@ -868,8 +868,6 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
 		} break;
 		case Variant::REAL: {
 
-			double d = p_variant;
-			float f = d;
 			if (flags & ENCODE_FLAG_64) {
 				if (buf) {
 					encode_double(p_variant.operator double(), buf);

+ 2 - 2
core/ustring.cpp

@@ -1828,8 +1828,8 @@ static double built_in_strtod(const C *string, /* A decimal ASCII floating-point
 	int sign, expSign = false;
 	double fraction, dblExp;
 	const double *d;
-	register const C *p;
-	register int c;
+	const C *p;
+	int c;
 	int exp = 0; /* Exponent read from "EX" field. */
 	int fracExp = 0; /* Exponent that derives from the fractional
 				 * part. Under normal circumstances, it is

+ 3 - 0
drivers/gles3/rasterizer_gles3.cpp

@@ -73,6 +73,8 @@ RasterizerScene *RasterizerGLES3::get_scene() {
 #define _EXT_DEBUG_SEVERITY_LOW_ARB 0x9148
 #define _EXT_DEBUG_OUTPUT 0x92E0
 
+#ifdef GLAD_ENABLED
+// Restricting to GLAD as only used in initialize() with GLAD_GL_ARB_debug_output
 #if (defined WINDOWS_ENABLED) && !(defined UWP_ENABLED)
 #define GLAPIENTRY APIENTRY
 #else
@@ -123,6 +125,7 @@ static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GL
 
 	ERR_PRINTS(output);
 }
+#endif // GLAD_ENABLED
 
 typedef void (*DEBUGPROCARB)(GLenum source,
 		GLenum type,

+ 3 - 1
main/main.cpp

@@ -115,9 +115,11 @@ static bool editor = false;
 static bool project_manager = false;
 static String locale;
 static bool show_help = false;
-static bool auto_build_solutions = false;
 static bool auto_quit = false;
 static OS::ProcessID allow_focus_steal_pid = 0;
+#ifdef TOOLS_ENABLED
+static bool auto_build_solutions = false;
+#endif
 
 // Display
 

+ 1 - 1
modules/csg/csg_gizmos.cpp

@@ -215,7 +215,7 @@ void CSGShapeSpatialGizmoPlugin::commit_handle(EditorSpatialGizmo *p_gizmo, int
 		UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
 		ur->create_action(TTR("Change Box Shape Extents"));
 		static const char *method[3] = { "set_width", "set_height", "set_depth" };
-		float current;
+		float current = 0;
 		switch (p_idx) {
 			case 0: current = s->get_width(); break;
 			case 1: current = s->get_height(); break;