From 21646008d5db4de31053ee5d347cd7c4e88a53e7 Mon Sep 17 00:00:00 2001 From: Daniel Cheng Date: Wed, 13 Sep 2023 18:39:58 -0700 Subject: [PATCH] Don't define field in ExternalFileHandler that's not used on Windows. This fixes: ``` error: private field 'buffer_aligned_size_' is not used [-Werror,-Wunused-private-field] 87 | int64 buffer_aligned_size_{}; | ^ ``` in the downstream Chrome build. PiperOrigin-RevId: 565221813 --- mediapipe/tasks/cc/core/external_file_handler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mediapipe/tasks/cc/core/external_file_handler.h b/mediapipe/tasks/cc/core/external_file_handler.h index 3150fde59..01352df7f 100644 --- a/mediapipe/tasks/cc/core/external_file_handler.h +++ b/mediapipe/tasks/cc/core/external_file_handler.h @@ -82,9 +82,11 @@ class ExternalFileHandler { // The aligned mapped memory buffer offset, if any. int64 buffer_aligned_offset_{}; +#ifndef _WIN32 // The aligned mapped memory buffer size in bytes taking into account the // offset shift introduced by buffer_aligned_memory_offset_, if any. int64 buffer_aligned_size_{}; +#endif }; } // namespace core