list: Fix warnings when compiling in release mode