Bugzilla – Bug 6864
Compile warning in server/conf.c -- cast from pointer to integer of different size
Last modified: 2009-12-07 16:25:59
You need to log in before you can comment on or make changes to this bug.
conf.c: In function ‘conf_read’: conf.c:170: warning: cast from pointer to integer of different size The problem is very likely that a pointer to a "void" is larger than an "int". This is the code in question: switch (options[i].type) { case BOOL:/* Same as INT */ line 170 ===> case INT: *(int *) options[i].val = (int) options[i].defval; <=== break; case STR: if (*(char **) options[i].val && *(char **) options[i].val != options[i].defval) globus_libc_free(*(char **) options[i].val); *(char **) options[i].val = options[i].defval; break; default: break; } This is the definition: typedef struct { char *name; void *val; void *defval; opttypes_t type; int flags; #define CF_CMDLINE 0x1 #define CF_DEPRECATED 0x2 #define CF_PRIVATE 0x4 } OPTION;