[validation] unused variable detection for for-loop and switch parameters
https://bugs.eclipse.org/bugs/show_bug.cgi?id=365712

Change-Id: I1ffe37ac8695526887ef32b81c56bf74110512ef