cppcheck: reduce scope

Change-Id: Ifa54cc132f0c6591c57639f85e789b08a60b7f4b