Keil Logo

Using PC-lint

PC-lint has many options that allow you to configure the diagnostics output, for example

  • Disable a PC-lint message for a statement.
  • Disable a PC-lint message for a complete module.
  • Disable a PC-lint message for a complete project.

Disable message for a statement To disable a message for a statement, enter the following PC-Lint command in a comment before the statement: lint –e(number), where number is the PC-lint message number. Example

//lint --e(715)    // disable 'argument' not referenced once
void phaseA (void *argument) {
  for (;;) {
    osThreadFlagsWait(0x0001, osFlagsWaitAny ,osWaitForever);
    g_phases.phaseA = 1;
    signal_func(tid_phaseB);
    g_phases.phaseA = 0;
  }
}

Disable message for a module To disable a message for a module enter the following PC-Lint command in a comment at the beginning of a module: lint enumber. You may enable the message number in the code again using lint e+number. Example

//lint e715    // disable "'argument' not referenced " for entire module
#include <stdio.h>
.
.
.
//lint +e715    // enable "'argument' not referenced" again for module
void phaseA (void *argument) {
  for (;;) {
    osThreadFlagsWait(0x0001, osFlagsWaitAny ,osWaitForever);
    g_phases.phaseA = 1;
    signal_func(tid_phaseB);
    g_phases.phaseA = 0;
  }
}

Disable message for a complete project

To disable a message for a complete project, enter the PC-Lint command in the dialog Tools – Set-up PC-Lint under Additional Lint Commands.

Note

  • For more information refer to the PC-Lint manual.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.