Fix warning: cast from pointer to integer of different size.

This commit is contained in:
Ben Noordhuis 2010-11-08 00:13:58 +01:00 committed by Garux
parent ca7fb9b9ed
commit a265802dff
2 changed files with 6 additions and 3 deletions

View File

@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
*****************************************************************************/ *****************************************************************************/
#include <stddef.h>
#define MAX_STRINGFIELD 80 #define MAX_STRINGFIELD 80
//field types //field types
@ -48,7 +49,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
typedef struct fielddef_s typedef struct fielddef_s
{ {
char *name; //name of the field char *name; //name of the field
int offset; //offset in the structure size_t offset; //offset in the structure
int type; //type of the field int type; //type of the field
//type specific fields //type specific fields
int maxarray; //maximum array size int maxarray; //maximum array size

View File

@ -29,9 +29,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "../botlib/l_struct.h" #include "../botlib/l_struct.h"
#include "../botlib/l_libvar.h" #include "../botlib/l_libvar.h"
#include <stddef.h>
//structure field offsets //structure field offsets
#define BBOX_OFS(x) (int)&(((aas_bbox_t *)0)->x) #define BBOX_OFS(x) offsetof(aas_bbox_t, x)
#define CFG_OFS(x) (int)&(((cfg_t *)0)->x) #define CFG_OFS(x) offsetof(cfg_t, x)
//bounding box definition //bounding box definition
fielddef_t bbox_fields[] = fielddef_t bbox_fields[] =