[PATCH] loader: Fix constant address warning on Mac OS.

Charles Davis cdavis at mymail.mines.edu
Fri Oct 7 17:05:25 CDT 2011


Everywhere else, the variable 'wine_main_preload_info' is a pointer that
is filled in by the preloader. Mac OS, on the other hand, does not have
a preloader. Instead, 'wine_main_preload_info' is a static array that is
filled in from various sections created in the output Mach-O file. It's
futile to test it there. In fact, it produces a warning that causes
buildbot to stumble.
---
 loader/main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/loader/main.c b/loader/main.c
index 8434d81..11f475b 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -219,7 +219,9 @@ int main( int argc, char *argv[] )
         }
     }
 
+#ifndef __APPLE__
     if (wine_main_preload_info)
+#endif
     {
         for (i = 0; wine_main_preload_info[i].size; i++)
             reserve_area( wine_main_preload_info[i].addr, wine_main_preload_info[i].size );
-- 
1.7.7




More information about the wine-patches mailing list