Skip to content

Fixed shadowed variables

Jonathan Saylor requested to merge jsaylor/fix-shadows-2 into master

All unittests are passing.

This was created from !329 (closed) per @ypolyakov request to only make the core changes

I did manual revert of the src/pke/**_ files and utilities.h change, so need to squash merge this so that history is clean

Shadowed variables are dangerous, they can lead to unexpected behavior, all these changes were identified by patching the main CMakeLists.txt with:

# Test build ONLY 
set(CXX_COMPILE_FLAGS "${CXX_COMPILE_FLAGS} -Wshadow=compatible-local")

The changes were inspired by this lecture: https://www.youtube.com/watch?v=lkgszkPnV8g

Edited by Jonathan Saylor

Merge request reports