Fix warnings and compile error for dynamic memory pool