DMD compiler - warning of unused variables

DLearner bmqazwsx123 at gmail.com
Mon Aug 16 14:14:27 UTC 2021


Hi

Please see code below:
```
void main() {

    import std.stdio;

    size_t i;
    size_t j;

    i = 5;

    writeln("i = ",i);

}

```

Is there a compiler option that would warn that variable 'j' is 
defined but not used?

Best regards



More information about the Digitalmars-d-learn mailing list