The open source OpenXR runtime

xrt: fix compiler warning messages in android builds

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2438>

+8 -5
+1 -1
src/xrt/auxiliary/android/CMakeLists.txt
··· 7 7 ) 8 8 target_include_directories(android_app_glue PUBLIC ${ANDROID_NDK}/sources/android/native_app_glue) 9 9 # disable these warnings in external code 10 - target_compile_options(android_app_glue PRIVATE -Wno-format-pedantic) 10 + target_compile_options(android_app_glue PRIVATE -Wno-format-pedantic -Wno-strict-prototypes) 11 11 12 12 add_library( 13 13 aux_android STATIC
+1
src/xrt/auxiliary/android/android_custom_surface.cpp
··· 230 230 .xdpi = displayMetrics.get<float>("xdpi"), 231 231 .ydpi = displayMetrics.get<float>("ydpi"), 232 232 .refresh_rate = displayRefreshRate, 233 + .refresh_rates = {}, 233 234 .refresh_rate_count = (uint32_t)supported_refresh_rates.size(), 234 235 }; 235 236 for (int i = 0; i < (int)metrics.refresh_rate_count; ++i) {
+2
src/xrt/auxiliary/vk/vk_image_allocator.c
··· 266 266 } 267 267 268 268 // In 269 + #if !defined(XRT_GRAPHICS_BUFFER_HANDLE_IS_AHARDWAREBUFFER) 269 270 VkImageMemoryRequirementsInfo2 memory_requirements_info = { 270 271 .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, 271 272 .image = image, 272 273 }; 274 + #endif 273 275 274 276 // Out->pNext 275 277 VkMemoryDedicatedRequirements memory_dedicated_requirements = {
+1 -1
src/xrt/compositor/client/comp_gl_memobj_swapchain.c
··· 72 72 free(sc); 73 73 } 74 74 75 - static bool 75 + XRT_MAYBE_UNUSED static bool 76 76 client_gl_memobj_swapchain_import(GLuint memory, size_t size, xrt_graphics_buffer_handle_t handle) 77 77 { 78 78 #if defined(XRT_GRAPHICS_BUFFER_HANDLE_IS_FD)
+1 -1
src/xrt/drivers/android/android_prober.c
··· 82 82 */ 83 83 84 84 struct xrt_auto_prober * 85 - android_create_auto_prober() 85 + android_create_auto_prober(void) 86 86 { 87 87 struct android_prober *p = U_TYPED_CALLOC(struct android_prober); 88 88 p->base.name = "Android";
+1 -1
src/xrt/drivers/android/android_sensors.c
··· 241 241 242 242 243 243 struct android_device * 244 - android_device_create() 244 + android_device_create(void) 245 245 { 246 246 enum u_device_alloc_flags flags = 247 247 (enum u_device_alloc_flags)(U_DEVICE_ALLOC_HMD | U_DEVICE_ALLOC_TRACKING_NONE);
+1 -1
src/xrt/state_trackers/oxr/oxr_session_gfx_gles_android.c
··· 100 100 "XrGraphicsBindingEGLMNDX::config cannot be null when EGL_KHR_no_config_context is " 101 101 "not supported by the display."); 102 102 } 103 - if (xret != XR_SUCCESS || xcgl == NULL) { 103 + if (xret != XRT_SUCCESS || xcgl == NULL) { 104 104 return oxr_error(log, XR_ERROR_INITIALIZATION_FAILED, "Failed to create an egl client compositor"); 105 105 } 106 106