Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wakaama-dev] Compilation Issues With Wakaama Sample Client, DTLS enabled

Hello list,
Please verify and fix the following:

1.) Doing "make all; make clean" will erase at least dtls.h ! Manual restoration is required.
2.) Build process emits a lot of warnings if the gcc -Wall option is used. This is not good, as the many "non-serious" errors will provide camouflage for the serious errors. 
3.) Serious Errors are being detected by -Wall. In the following function, the return code is undefined !

Please fix.

Thank you 

coap_status_t object_createInstance(lwm2m_context_t * contextP,
                                    lwm2m_uri_t * uriP,
                                    lwm2m_data_t * dataP)
{
    lwm2m_object_t * targetP;
    coap_status_t result;

    targetP = prv_findObject(contextP, uriP->objectId);
    if (NULL == targetP) return COAP_404_NOT_FOUND;

    if (NULL == targetP->createFunc)
    {
        return COAP_405_METHOD_NOT_ALLOWED;
    }

    result = targetP->createFunc(lwm2m_list_newId(targetP->instanceList), dataP->value.asChildren.count, dataP->value.asChildren.array, targetP);
}

List of serious warnings I found:

/home/pi/wakaama/core/objects.c: In function 'object_createInstance':
/home/pi/wakaama/core/objects.c:761:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/home/pi/wakaama/core/objects.c: In function 'object_writeInstance':
/home/pi/wakaama/core/objects.c:779:1: warning: control reaches end of non-void function [-Wreturn-type]
 }

/home/pi/wakaama/core/data.c: In function 'lwm2m_data_free':
/home/pi/wakaama/core/data.c:94:9: warning: enumeration value 'LWM2M_TYPE_UNDEFINED' not handled in switch [-Wswitch]
         switch (dataP[i].type)
         ^
/home/pi/wakaama/core/data.c:94:9: warning: enumeration value 'LWM2M_TYPE_INTEGER' not handled in switch [-Wswitch]
/home/pi/wakaama/core/data.c:94:9: warning: enumeration value 'LWM2M_TYPE_FLOAT' not handled in switch [-Wswitch]
/home/pi/wakaama/core/data.c:94:9: warning: enumeration value 'LWM2M_TYPE_BOOLEAN' not handled in switch [-Wswitch]
/home/pi/wakaama/core/data.c:94:9: warning: enumeration value 'LWM2M_TYPE_OBJECT_LINK' not handled in switch [-Wswitch]
/home/pi/wakaama/core/data.c: In function 'lwm2m_data_serialize':
 ^







Back to the top