Fix build failures and accept clang suggestions am: ff6a5f9dc9

Original change: https://android-review.googlesource.com/c/platform/external/piex/+/1730751

Change-Id: I0f6d38dd6ef0e30925e09550f66090cba0b20080