Fix 'unused/unreferenced variable' warnings in SharedArray.h

This patch fixes 'unused/unreferenced variable' warnings in SharedArray.h