I ported a a firmware from IAR Embedded Workbench to Kiel version 4
I get this warning after building the project in Kiel but not in IAR Warning: #815-D: type qualifier on return type is meaningless.
extern const LonNvDescription* const LonGetNvTable(void);
extern const LonApiError LonPollNv(const unsigned index);
what is the correct way to define this type of function
As 'const' is the only qualifier here, I'd question its appropriateness.
Plenty on google already; eg,
stackoverflow.com/.../why-is-a-type-qualifier-on-a-return-type-meaningless
"what is the correct way to define this type of function"
What is it, exactly, that you're trying to achieve by this?
Ya true ,..any particular reason why it doesn't give warnings in IAR but in Kiel ,..!
There is no requirement on any compiler to give such a warning.