fix unused variable warning

Change-Id: Ib7ce4380b4df1dcd215f319a70d250e430e2c267
Merge topic 'fix_legend_warning' into master

fe9bf22e fix unused variable warning