Browse Source

UI, libobs: Fix not handled in switch warnings

These warnings were being spit out by GCC on Linux.
cg2121 2 years ago
parent
commit
1ac609f1ff
3 changed files with 9 additions and 1 deletions
  1. 5 1
      UI/qt-wrappers.cpp
  2. 2 0
      libobs/obs-nix.c
  3. 2 0
      plugins/linux-v4l2/v4l2-decoder.c

+ 5 - 1
UI/qt-wrappers.cpp

@@ -135,14 +135,18 @@ bool QTToGSWindow(QWindow *window, gs_window &gswindow)
 		gswindow.display = obs_get_nix_platform_display();
 		break;
 #ifdef ENABLE_WAYLAND
-	case OBS_NIX_PLATFORM_WAYLAND:
+	case OBS_NIX_PLATFORM_WAYLAND: {
 		QPlatformNativeInterface *native =
 			QGuiApplication::platformNativeInterface();
 		gswindow.display =
 			native->nativeResourceForWindow("surface", window);
 		success = gswindow.display != nullptr;
 		break;
+	}
 #endif
+	default:
+		success = false;
+		break;
 	}
 #endif
 	return success;

+ 2 - 0
libobs/obs-nix.c

@@ -416,6 +416,8 @@ bool obs_hotkeys_platform_init(struct obs_core_hotkeys *hotkeys)
 		hotkeys_vtable = obs_nix_wayland_get_hotkeys_vtable();
 		break;
 #endif
+	default:
+		break;
 	}
 
 	return hotkeys_vtable->init(hotkeys);

+ 2 - 0
plugins/linux-v4l2/v4l2-decoder.c

@@ -116,6 +116,8 @@ int v4l2_decode_frame(struct obs_source_frame *out, uint8_t *data,
 	case AV_PIX_FMT_YUV444P:
 		out->format = VIDEO_FORMAT_I444;
 		break;
+	default:
+		break;
 	}
 
 	return 0;