This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS: unused function warning

Tool/software: Code Composer Studio

Hello,

I am compiling code for the A15 on the TDA2xx using the arm gnu tools eabi.

i have a static function which i am currently not using, but even though i have added the __attribute__((unused) i still get a warning on that function that it is not used.

from the tools manual this attribute is supported and should work also for static functions.

the reason i am posting this on a CCS forum is because the warning seems to come from CCS and not from the compiler as even if before i compile this warning pops-up and when i delete it it pops up again after a few seconds/minutes without me ever started compilation. i have worked with this code for a long time and never got this warning but suddenly it started to appear (did not change nay of the tools).

I am currently using CCS version 7.4

I'll appreciate any help/advice/insight for this issue

Thanks

Guy

  • Guy Mardiks said:
    the reason i am posting this on a CCS forum is because the warning seems to come from CCS and not from the compiler

    If you look at the CCS Problems view is the warning about the unused static function of the type "Code Analysis"? If so, that means the warning is from the Eclipse Code Analysis rather than the compiler.

    From a quick-test with CCS 8.0 using __attribute__((unused)) prevents the GCC compiler from warning about the unused static function, but doesn't prevent the Eclipse Code analysis from producing a warning.

    By default Code Analysis is disabled for CCS projects, but maybe code analysis got enabled for some reason. As well as being able to completely disable Code Analysis, the Code Analysis configuration allows the "Unused static function" warning to be disabled (while leaving other warnings enabled).

  • Hi,

    Thanks a lot for the info about code analysis of CCS it was very helpful.

    what could be the reason that it suddenly changed (i have never touched these settings)?

    are these defaults change between CCS versions?

    when i am looking at the code analysis settings  -  code styling part is indeed disabled but the "potential Programming condition" is on - is that how it suppose to be by default or does it mean the somehow the CCS settings got corrupted (as i have not changed it)?

    Thanks

    Guy