src/modules.c: misc cleanup for compiler warnings

modules.c:799:37: warning: cast from function call of type 'void *' to
                  non-matching type 'uintptr_t' (aka 'unsigned long')
                  [-Wbad-function-cast]

    (... and 1 more of the same)

Redundant double-cast removed.
This commit is contained in:
Aaron Jones 2017-07-31 04:28:16 +00:00
parent fa2b7ab282
commit ef14b780b4
No known key found for this signature in database
GPG key ID: 8AF0737488AB3012

View file

@ -796,9 +796,9 @@ load_a_module(const char *path, int warn, int core)
* as a single int in order to determine the API version. * as a single int in order to determine the API version.
* -larne. * -larne.
*/ */
mapi_version = (int *) (uintptr_t) dlsym(tmpptr, "_mheader"); mapi_version = (int *) dlsym(tmpptr, "_mheader");
if((mapi_version == NULL if((mapi_version == NULL
&& (mapi_version = (int *) (uintptr_t) dlsym(tmpptr, "__mheader")) == NULL) && (mapi_version = (int *) dlsym(tmpptr, "__mheader")) == NULL)
|| MAPI_MAGIC(*mapi_version) != MAPI_MAGIC_HDR) || MAPI_MAGIC(*mapi_version) != MAPI_MAGIC_HDR)
{ {
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,