implement extract_indent
use indentation to detect end of functions
suppress memcheck error