warning: variable "<name>" is never read and never assigned

12
Feb

Ada tells you whenever you declare a variable and don't use it.

There could be reason why you'd want to create and not use a variable so this is just a warning. However, it is often a small mistake of commenting out or deleting part of the code and leaving the now unused variable.

To fix the problem either delete the declaration or remove it entirely.

Remember that Ada will not remove the declaration unless it can safely do so. This means, if it doesn't call a function that can generate side effects (the initialization of the different fields in your data may cause the compiler to process the declaration even though the result won't be used.)

0
Your rating: None