Hi,

attached patch is the first portion to make warzone 64bit clean, to let
it natively run on i.e. amd64 Linux.

On amd64 the size of an pointer is NOT equal to the size on an int. So
cast from an pointer to ant int and vice versa are not allowed.

Please consider applying.

Regards,
Stefan

Index: src/stats.c
===================================================================
--- src/stats.c (revision 347)
+++ src/stats.c (working copy)
@@ -3444,7 +3444,7 @@
 //                     DBPRINTF(("found at %d\n",count));
                        return count;
                }
-               psStats = (BASE_STATS *)((UDWORD)psStats + statSize);
+               psStats = (BASE_STATS *)((void *)psStats + statSize);
        }
 //     DBPRINTF(("not found\n"));
        //return -1 if record not found or an invalid component type is passed 
in
Index: src/research.c
===================================================================
--- src/research.c      (revision 347)
+++ src/research.c      (working copy)
@@ -2672,10 +2672,11 @@
 /* returns a pointer to a component based on the name - used to load in the 
research */
 COMP_BASE_STATS * getComponentDetails(STRING *pName, STRING *pCompName)
 {
-       UDWORD                          stat, size, quantity, address, inc;
+       UDWORD                  stat, size, quantity, inc;
        COMP_BASE_STATS         *pArtefact;
+       void                    *address;
 #ifdef HASH_NAMES
-       UDWORD                          HashedName;
+       UDWORD                  HashedName;
 #endif
 
        stat = componentType(pName);
@@ -2753,7 +2754,7 @@
                        return FALSE;
                }
        }
-       address = (UDWORD)pArtefact;
+       address = (void *)pArtefact;
 
 #ifdef HASH_NAMES
        HashedName=HashString(pCompName);
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to