Haven’t checked in v24, but in v21 and v23 this error could be improved.
Instead saying
"Some variables are defined but not used\nDefined:[A, B, C, D, E, F]\nUsed:[A, C, D, E, F]\n"
can it say something like
"Some variables are defined but not used:[B]\n"