Skip to content

Fix IP520 pointer cast warnings #2

@JJL772

Description

@JJL772

Luckily this is RTEMS-only code, and all of our supported RTEMS targets are 32-bit. Regardless, converting int -> ptr is a bad idea, especially without an explicit cast. Incompatible function pointers are even worse, but will still work in this case.

../ip520_RTEMS.c: In function 'IP520ModuleInit':
../ip520_RTEMS.c:403:9: warning: passing argument 4 of 'ipmIntConnect' from incompatible pointer type [enabled by default]
         if (ipmIntConnect(carrier, slot, int_num, IP520Int, IP520LastModule))
         ^
In file included from ../ip520_RTEMS.c:45:0:
../../include/drvIpac.h:224:20: note: expected 'void (*)(void *)' but argument is of type 'void (*)(int)'
 epicsShareFunc int ipmIntConnect(int carrier, int slot, int vector, 
                    ^
../ip520_RTEMS.c:403:9: warning: passing argument 5 of 'ipmIntConnect' makes pointer from integer without a cast [enabled by default]
         if (ipmIntConnect(carrier, slot, int_num, IP520Int, IP520LastModule))
         ^
In file included from ../ip520_RTEMS.c:45:0:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions