Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion include/rtkIterationCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,15 @@ class ITK_TEMPLATE_EXPORT OutputIterationCommand : public IterationCommand<TCall
using WriterType = itk::ImageFileWriter<TOutputImage>;
auto writer = WriterType::New();

char buffer[1024];
char buffer[1024];
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif
unsigned int size = snprintf(buffer, 1024, m_FileFormat.c_str(), this->m_IterationCount);
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic pop
#endif
writer->SetFileName(std::string(buffer, size));

writer->SetInput(caller->GetOutput());
Expand Down
Loading