Lots of warnings "unused parameter 'instace'" with KSDK 1.2.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lots of warnings "unused parameter 'instace'" with KSDK 1.2.0

440 Views
brunoalmeida
Contributor I

I have a project for MKL27Z256VLH4 and I'm not using KDS, only a Makefile and GCC.

 

I'm using KSDK 1.2.0.

 

When I compile the project, I get a LOT of warnings like these:

 

../Freescale/KSDK_1.2.0/platform/hal/inc/../src/sim/MKL27Z4/fsl_sim_hal_MKL27Z4.h:418:49: warning: unused parameter 'instance' [-Wunused-parameter]

../Freescale/KSDK_1.2.0/platform/system/src/clock/MKL27Z4/fsl_clock_MKL27Z4.c:389:42: warning: unused parameter 'instance' [-Wunused-parameter]

 

The defined MCU for the compiler is: CPU_MKL27Z256VLH4

 

The firmware runs with no problems, but I'm not confortable with all of these warnings... Is there something that I forgot? How can I get rid of these warnings?

 

Regards,

Bruno.

Labels (1)
0 Kudos
3 Replies

356 Views
EarlOrlando
Senior Contributor II

Hello Bruno,

Have you tried the -Wno-unused flag when you compile? Does it work?

Regards,

Earl.

0 Kudos

356 Views
brunoalmeida
Contributor I

Hi Earl,

Yes it does work, but I usually want the compiler to give all the warnings...

When the project is created using KDS, is this flag added to the project by default?

Regards,

Bruno.

0 Kudos

356 Views
EarlOrlando
Senior Contributor II

Hello Bruno,

Does the -Wno-unused flag suppresses all the warnings (not only the unused ones)? Also, I see that you are using the flag -Wunused, if you do not use that flag the unused warnings should not appear.

In KDS, the warning flags are enabled under the menu Properties > C/C++ Build > Tool Settings tab > Warnings.

Best regards,

Earl.

0 Kudos