Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 877 Bytes

compiler-warning-level-4-c4100.md

File metadata and controls

31 lines (25 loc) · 877 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 4) C4100
Compiler Warning (level 4) C4100
11/04/2016
C4100
C4100
478ed97d-e502-49e4-9afb-ac2a6c61194b

Compiler Warning (level 4) C4100

'identifier' : unreferenced formal parameter

The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored.

C4100 can also be issued when code calls a destructor on a otherwise unreferenced parameter of primitive type. This is a limitation of the Microsoft C++ compiler.

The following sample generates C4100:

// C4100.cpp
// compile with: /W4
void func(int i) {   // C4100, delete the unreferenced parameter to
                     //resolve the warning
   // i;   // Or uncomment this line to add a reference
}

int main()
{
   func(1);
}