]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
src/modules.c: misc cleanup for compiler warnings
authorAaron Jones <redacted>
Mon, 31 Jul 2017 04:28:16 +0000 (04:28 +0000)
committerAaron Jones <redacted>
Fri, 4 Aug 2017 12:32:56 +0000 (12:32 +0000)
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.

src/modules.c

index c9f7fccb4b9521b1728f5560b1733ce5ac538323..c54a877159e1790a4c1589f515ebebcd31ad48a0 100644 (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.
         *      -larne.
         */
-       mapi_version = (int *) (uintptr_t) dlsym(tmpptr, "_mheader");
+       mapi_version = (int *) dlsym(tmpptr, "_mheader");
        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)
        {
                sendto_realops_snomask(SNO_GENERAL, L_ALL,