logical_proc_info_add_by_id, logical_proc_info_add_cache, logical_proc_info_add_group, and logical_proc_info_add_numa_node are only useful and invoked on Linux, so disable their build elsewhere.
(Without this compilers will, rightfully, warn about unused functions. GCC definitely does.)
Signed-off-by: Gerald Pfeifer gerald@pfeifer.com --- dlls/ntdll/unix/system.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index a889b2e020c..5130b4c18ba 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -506,6 +506,8 @@ void init_cpu_info(void) cpu_info.Architecture, cpu_info.Level, cpu_info.Revision, cpu_info.FeatureSet ); }
+#ifdef linux + static BOOL grow_logical_proc_buf( SYSTEM_LOGICAL_PROCESSOR_INFORMATION **pdata, DWORD *max_len ) { SYSTEM_LOGICAL_PROCESSOR_INFORMATION *new_data; @@ -752,6 +754,8 @@ static BOOL logical_proc_info_add_group( SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX return TRUE; }
+#endif + #ifdef linux
/* Helper function for counting bitmap values as commonly used by the Linux kernel
Gerald Pfeifer gerald@pfeifer.com writes:
logical_proc_info_add_by_id, logical_proc_info_add_cache, logical_proc_info_add_group, and logical_proc_info_add_numa_node are only useful and invoked on Linux, so disable their build elsewhere.
They are also used on macOS. A better fix would be to implement the missing functionality for *BSD platforms.
On Tue, 8 Dec 2020, Alexandre Julliard wrote:
logical_proc_info_add_by_id, logical_proc_info_add_cache, logical_proc_info_add_group, and logical_proc_info_add_numa_node are only useful and invoked on Linux, so disable their build elsewhere.
They are also used on macOS. A better fix would be to implement the missing functionality for *BSD platforms.
Hmm, that's true. Until that happens, would you consider a patch
#if defined(linux) || defined(__APPLE__)
instead?
(Damjan, maybe that's something for you? We're talking about dlls/ntdll/unix/system.c.)
Thanks, Gerald