compiler warnings in DeviceDriver.c

41 views
asked Jan 2 in System Integration by MikeZ
Hi All,

My application is working, I  am using the STM32F429 MCU and the Keil uVision together with Embedded Studio. I get compiler warning " Implicit declaration of function ' DeviceDeviceClass_UpdateTemp' is invalide in C99" this relates to  the property I defined in Device::DeviceClass. As I say it is works without a  problem, I know it is definitely something I am not doing, I would like to know what  that is so I can be rid of this warning.

Thanks

MikeZ

1 Answer

0 votes
answered Jan 3 by Manfred Schweyer

Hi Mike,

I assume that you get this compiler waring when you compile your device driver file (e.g. DeviceDriver.c). There you are accessing a function DeviceDeviceClass_UpdateTemp() which is not declared for the compiler. Please ensure that you have included the header file containing the declaration of UpdateTemp(). Please put the include

#include "Device.h"

at the beginning of your device driver file.

Best regards,

Manfred.

commented Jan 3 by MikeZ
Hi Manfred,

I have it included, but still the warnings persist.

Thanks

MikeZ
commented Jan 3 by Manfred Schweyer
Hi MikeZ,

without seeing the code it's difficult to give the answer.

Please compare the declaration of DeviceDeviceClass_UpdateTemp() with your function call of DeviceDeviceClass_UpdateTemp(). Is there some missmatch?

Is the header file that really contains the declaration of DeviceDeviceClass_UpdateTemp() included?

Otherwise, please post the declaration and the usage of the function here.

Best regards,

Manfred.
commented Jan 6 by MikeZ
Hi Manfred,

I resolved the problem,  my  most recent device.h was not being referenced. I changed the project structure and now warnings are all gone. Thanks for assistance.

MikeZ

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...