Ver código fonte

libobs-opengl: Fix Clang warnings

jpark37 6 anos atrás
pai
commit
2af98bf483
2 arquivos alterados com 20 adições e 5 exclusões
  1. 2 2
      libobs-opengl/gl-helpers.h
  2. 18 3
      libobs-opengl/gl-subsystem.c

+ 2 - 2
libobs-opengl/gl-helpers.h

@@ -78,8 +78,8 @@ static inline bool gl_success(const char *funcname)
 
 			--attempts;
 			if (attempts == 0) {
-				blog(LOG_ERROR, "Too many GL errors, moving on",
-				     funcname, errorcode);
+				blog(LOG_ERROR,
+				     "Too many GL errors, moving on");
 				break;
 			}
 		} while (errorcode != GL_NO_ERROR);

+ 18 - 3
libobs-opengl/gl-subsystem.c

@@ -388,6 +388,8 @@ device_samplerstate_create(gs_device_t *device,
 
 gs_timer_t *device_timer_create(gs_device_t *device)
 {
+	UNUSED_PARAMETER(device);
+
 	struct gs_timer *timer;
 
 	GLuint queries[2];
@@ -404,6 +406,8 @@ gs_timer_t *device_timer_create(gs_device_t *device)
 
 gs_timer_range_t *device_timer_range_create(gs_device_t *device)
 {
+	UNUSED_PARAMETER(device);
+
 	return NULL;
 }
 
@@ -1504,15 +1508,26 @@ bool gs_timer_get_data(gs_timer_t *timer, uint64_t *ticks)
 	return true;
 }
 
-void gs_timer_range_destroy(gs_timer_range_t *range) {}
+void gs_timer_range_destroy(gs_timer_range_t *range)
+{
+	UNUSED_PARAMETER(range);
+}
 
-void gs_timer_range_begin(gs_timer_range_t *range) {}
+void gs_timer_range_begin(gs_timer_range_t *range)
+{
+	UNUSED_PARAMETER(range);
+}
 
-void gs_timer_range_end(gs_timer_range_t *range) {}
+void gs_timer_range_end(gs_timer_range_t *range)
+{
+	UNUSED_PARAMETER(range);
+}
 
 bool gs_timer_range_get_data(gs_timer_range_t *range, bool *disjoint,
 			     uint64_t *frequency)
 {
+	UNUSED_PARAMETER(range);
+
 	*disjoint = false;
 	*frequency = 1000000000;
 	return true;