Revert "lib: address -Wunused-but-set-variable"

Stephen Hemminger's commits contain all the changes and
several other warning fixes.

This reverts commit 6947dbebdc91b6272f8107a6e0dd211457438606.
4 files changed