[IOT-2741] Static Analysis warning fixes.