diff --git a/src/io/hdf5/HDF5IO.cpp b/src/io/hdf5/HDF5IO.cpp
index 2313b05f..efe51b00 100644
--- a/src/io/hdf5/HDF5IO.cpp
+++ b/src/io/hdf5/HDF5IO.cpp
@@ -1025,8 +1025,8 @@ HDF5IO::getStorageObjects(const std::string& path,
     if (objectType == StorageObjectType::Attribute
         || objectType == StorageObjectType::Undefined)
     {
-      SizeType numAttrs = group.getNumAttrs();
-      for (SizeType i = 0; i < numAttrs; ++i) {
+      unsigned int numAttrs = static_cast<unsigned int>(group.getNumAttrs());
+      for (unsigned int i = 0; i < numAttrs; ++i) {
         H5::Attribute attr = group.openAttribute(i);
         objects.emplace_back(attr.getName(), StorageObjectType::Attribute);
       }
@@ -1036,8 +1036,8 @@ HDF5IO::getStorageObjects(const std::string& path,
         || objectType == StorageObjectType::Undefined)
     {
       H5::DataSet dataset = m_file->openDataSet(path);
-      SizeType numAttrs = dataset.getNumAttrs();
-      for (SizeType i = 0; i < numAttrs; ++i) {
+      unsigned int numAttrs = static_cast<unsigned int>(dataset.getNumAttrs());
+      for (unsigned int i = 0; i < numAttrs; ++i) {
         H5::Attribute attr = dataset.openAttribute(i);
         objects.emplace_back(attr.getName(), StorageObjectType::Attribute);
       }
diff --git a/src/nwb/NWBFile.hpp b/src/nwb/NWBFile.hpp
index 0f900f29..5576cf84 100644
--- a/src/nwb/NWBFile.hpp
+++ b/src/nwb/NWBFile.hpp
@@ -130,7 +130,7 @@ class NWBFile : public Container
       const IO::BaseDataType& dataType = IO::BaseDataType::I16,
       RecordingContainers* recordingContainers = nullptr,
       std::vector<SizeType>& containerIndexes = emptyContainerIndexes);
-      
+
   /** @brief Create AnnotationSeries objects to record data into.
    * Created objects are stored in recordingContainers.
    * @param recordingNames vector indicating the names of the AnnotationSeries