Search code examples
cxc8pc-lint

How could PC-Lint ignore an expression or macro


I have got a xc8 program where I predefine the EEPROM:

__EEPROM_DATA (1, 2, 3, 4, 5, 6, 7, 8);

Know I like PC-Lint to ignore such an expression in all my files.


Solution

  • A possible way would be adding following to a .lnt file

    // activate _to_semi keyword
    +rw(_to_semi)
    
    // assign __EEPROM_DATA to "_to_semi" expression that means everything from 
    // "__EEPROM_DATA" until the next ";" will be ignored by PC-Lint             
    -d__EEPROM_DATA=_to_semi