Potential Bug in 04.00.22 SLQS Callback Header

Can somebody do a code inspection of the declarations associated with SLQSSetDHCPv4ClientLeaseStatusCallback in qaGobiApiCbk.h?

I’m compiling on Ubuntu 16.04, using gcc 5.4.0. with the 04.00.22 SLQS. I cant the following to compile:

SLQSSetDHCPv4ClientLeaseStatusCallbackParam dhcpV4Param;
dhcpV4Param.instance = 0;
dhcpV4Param.pCallback = DHCPv4ClientLeaseStatusCallback; <----Compiler barfs here

Compiler complains:
src/qmi_callbacks.c: In function ‘SubscribeCallbacks’:
src/qmi_callbacks.c:97:25: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
dhcpV4Param.pCallback = DHCPv4ClientLeaseStatusCallback;

If I assign instance to 0 and pCallback to NULL it compiles fine. I’ve looked at other callback declarations (the typedefs and structs, etc) and see one thing interesting about the parameter declaration for SLQSSetDHCPv4ClientLeaseStatusCallback:


  • DHCPv4 client lease status message callback function parameter.
  • \param instance[IN]
  •      - QMI instance
  • \param pCallback[IN]
  •      - Callback function pointer (0 - Disable)

typedef struct
BYTE instance;
tFNDHCPv4ClientLeaseStatus *pCallback;

Should it be:

tFNDHCPv4ClientLeaseStatus pCallback;


Or then again, maybe the problem is between my keyboard and my chair.

Thanks for any help.

Forgot to add function:
// This compiles fine by itself
void DHCPv4ClientLeaseStatusCallback( BYTE instance, WdsDHCPv4ClientLeaseInd *pMsg)
printf(“DCHP CL: my instance is %d\n”, instance);

printf(“DHCP CL: Lease State %d\n”, *(pMsg->pLeaseState));
printf(“DHCP CL: IPV4 Address %d\n”, *(pMsg->pIPv4Addr));