The following warnings apears from time to time. MEM_TST.C(41): warning C280: 'mem_DPP': unreferenced local variable Sometimes I want to suspend them, but I can't find how. suspend linker warnings, Lxxx, are possible via the project configuration screens but I didn't see any place to direct the compiler to suspend compilation warnings Cxxx. Is it possible at all ? I am using the following environment: IDE-Version: µVision2 V2.40 Tool Version Numbers: Toolchain Path: C:\Keil\C51\BIN\ C Compiler: C51.Exe V7.10 Assembler: A51.Exe V7.09 Linker/Locator: BL51.Exe V5.03 Librarian: LIB51.Exe V4.24 Hex Converter: OH51.Exe V2.6 CPU DLL: S8051.DLL V2.43 Dialog DLL: DCORE51.DLL V2.43 Target DLL: BIN\DCD_DoCD.DLL V1.06 Dialog DLL: TP51.DLL V2.43 Thanks. Amit A.
"Suspending" warnings is almost invariably the wrong thing to do. Fix the code so there's no reason for the warning to appear, instead. For the warning under consideration, that means to simply remove the superfluous variable (or enclose it in the same #if conditions that disabled the code using it).
"Just use a dummy assignment." This works in Keil, but in some other compilers it would give you another warning like "Code has no effect" or similar!
View all questions in Keil forum