From c5bd183b2b44ca5565d0bd0b788d4f66f12f2a0c Mon Sep 17 00:00:00 2001 From: Dan Church Date: Thu, 14 Nov 2019 10:26:30 -0600 Subject: [PATCH] Fix GCC unused function/variable warnings --- gtk/src/gtk_s9xwindow.cpp | 4 +++- shaders/glsl.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk/src/gtk_s9xwindow.cpp b/gtk/src/gtk_s9xwindow.cpp index 4cc4c129..6ff764d7 100644 --- a/gtk/src/gtk_s9xwindow.cpp +++ b/gtk/src/gtk_s9xwindow.cpp @@ -1534,8 +1534,9 @@ double Snes9xWindow::get_refresh_rate () { double refresh_rate = 0.0; +#if defined GDK_WINDOWING_X11 || defined GDK_WINDOWING_WAYLAND GdkDisplay *display = gtk_widget_get_display (window); - GdkWindow *gdk_window = gtk_widget_get_window (window); +#endif #ifdef GDK_WINDOWING_X11 if (GDK_IS_X11_DISPLAY (display)) @@ -1549,6 +1550,7 @@ Snes9xWindow::get_refresh_rate () #ifdef GDK_WINDOWING_WAYLAND if (GDK_IS_WAYLAND_DISPLAY (display)) { + GdkWindow *gdk_window = gtk_widget_get_window (window); GdkMonitor *monitor = gdk_display_get_monitor_at_window(display, gdk_window); refresh_rate = (double) gdk_monitor_get_refresh_rate(monitor) / 1000.0; } diff --git a/shaders/glsl.cpp b/shaders/glsl.cpp index 022b10b1..47bb74bc 100644 --- a/shaders/glsl.cpp +++ b/shaders/glsl.cpp @@ -268,6 +268,7 @@ static std::string canonicalize(const std::string &noncanonical) return filename_string; } +#ifdef USE_SLANG static GLuint string_to_format(char *format) { #define MATCH(s, f) \ @@ -306,6 +307,7 @@ static GLuint string_to_format(char *format) return GL_RGBA; } +#endif // filename must be canonical void GLSLShader::read_shader_file_with_includes(std::string filename,