lib: annotate the declared variables.
Added -Wall
codegen: use std::shared_ptr to store blocks.