Dissabling specific warnings in C51

I'm trying to disable some disturbing warnings (the generated code is fine; don't worry) but the only I find is the warninglevels (0, 1 or 2).

Is there any directive to disable a specific Warning in the C51 compiler?

  • (the generated code is fine; don't worry)
    If you go by "the code is fine" I pity you. The warnings are 'warnings' because they refer to a potential problem, where the errors refer to an absolute problem.

    Go ahead, ignore the warnings and wait a month or two for the reports of 'strange intermittent problems'

    Yes, I get warnings that 'are not a problem' such as 'unused variable', but I still remove them because they may (maybe later) be trouble. Continuing with the example, the 'irrelevant' "unused variable" means one less slot for the stack and maybe with some strange combination of interrupts and where they happen a stack overflow may occur because of just that one space missing.

    If an employee of mine suppressed warning reporting by ANY means, he would be very close to entering the unemployment line.

    It is unfortunate that Keil, for purely business reasons - I'm sure, have to make 'warning suppression' even possible.

    Erik

More questions in this forum