diff --git a/include/osmium/io/bzip2_compression.hpp b/include/osmium/io/bzip2_compression.hpp index 35ae2541..99f4de40 100644 --- a/include/osmium/io/bzip2_compression.hpp +++ b/include/osmium/io/bzip2_compression.hpp @@ -296,13 +296,13 @@ namespace osmium { if (bzerror == BZ_STREAM_END) { if (!feof(m_file.file())) { void* unused = nullptr; - int nunused = 0; - ::BZ2_bzReadGetUnused(&bzerror, m_bzfile, &unused, &nunused); + int num_unused = 0; + ::BZ2_bzReadGetUnused(&bzerror, m_bzfile, &unused, &num_unused); if (bzerror != BZ_OK) { detail::throw_bzip2_error(m_bzfile, "get unused failed", bzerror); } - if (nunused != 0) { - std::string unused_data{static_cast(unused), static_cast(nunused)}; + if (num_unused != 0) { + std::string unused_data{static_cast(unused), static_cast(num_unused)}; ::BZ2_bzReadClose(&bzerror, m_bzfile); if (bzerror != BZ_OK) { throw bzip2_error{"bzip2 error: read close failed", bzerror};