RDC01013: Parameter not used
Severity: Information · Family: RDC (Rubberduck Core analyzers) ·
Raised by: ParameterNotUsedAnalyzer
Nothing in a procedure refers to one of its parameters.
Every caller must still pass an argument for it, unless it is Optional, and a reader of the signature expects the procedure to use it.
A procedure whose signature is not its own to choose is not reported:
- an implementation of an interface member, and a handler of an event, which repeat the declaration they match;
- a
Declare, which states what the library takes, and anEvent; - a
Publicmember of a class module, which may be a member of an interface another class module implements (RD-VBAL §5.2.4.2 Implements Directive).
The finding is the name of the parameter.
How it is raised
| Situation | Example | Resolution |
|---|---|---|
| A parameter nothing in the procedure refers to. | Sub Work(ByVal used As Long, ByVal unused As Long) Debug.Print usedEnd Sub |
Remove the parameter and the arguments of its callers, or use it. |
See also
ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca