@@ -56011,13 +56011,16 @@ namespace cimg_library {
5601156011 case cimg::keyS : if (disp.is_keyCTRLLEFT() || disp.is_keyCTRLRIGHT()) {
5601256012 static unsigned int snap_number = 0;
5601356013 do {
56014+ #pragma GCC diagnostic push
56015+ #pragma GCC diagnostic ignored "-Wformat-truncation"
5601456016 cimg_snprintf(filename,filename._width,cimg_appname "_%.6u."
5601556017#ifdef cimg_use_png
5601656018 "png",
5601756019#else
5601856020 "bmp",
5601956021#endif
5602056022 snap_number++);
56023+ #pragma GCC diagnostic pop
5602156024 } while (cimg::path_exists(filename));
5602256025 if (visu0) {
5602356026 (+visu0).__draw_text(" Saving snapshot...",font_size,(int)text_down).display(disp);
@@ -56030,11 +56033,14 @@ namespace cimg_library {
5603056033 static unsigned int snap_number = 0;
5603156034 do {
5603256035
56036+ #pragma GCC diagnostic push
56037+ #pragma GCC diagnostic ignored "-Wformat-truncation"
5603356038#ifdef cimg_use_zlib
5603456039 cimg_snprintf(filename,filename._width,cimg_appname "_%.6u.cimgz",snap_number++);
5603556040#else
5603656041 cimg_snprintf(filename,filename._width,cimg_appname "_%.6u.cimg",snap_number++);
5603756042#endif
56043+ #pragma GCC diagnostic pop
5603856044 } while (cimg::path_exists(filename));
5603956045 (+visu0).__draw_text(" Saving instance... ",font_size,(int)text_down).display(disp);
5604056046 save(filename);
@@ -60303,7 +60309,10 @@ namespace cimg_library {
6030360309 cimg_instance);
6030460310 CImg<charT> command(1024), filename_tmp(256), body(256);
6030560311 do {
60312+ #pragma GCC diagnostic push
60313+ #pragma GCC diagnostic ignored "-Wformat-truncation"
6030660314 cimg_snprintf(filename_tmp,filename_tmp._width,"%s.hdr",cimg::filenamerand());
60315+ #pragma GCC diagnostic pop
6030760316 } while (cimg::path_exists(filename_tmp));
6030860317 cimg_snprintf(command,command._width,"\"%s\" -w -c anlz -o \"%s\" -f \"%s\"",
6030960318 cimg::medcon_path(),
@@ -60325,7 +60334,10 @@ namespace cimg_library {
6032560334 load_analyze(command);
6032660335 std::remove(command);
6032760336 cimg::split_filename(command,body);
60337+ #pragma GCC diagnostic push
60338+ #pragma GCC diagnostic ignored "-Wformat-truncation"
6032860339 cimg_snprintf(command,command._width,"%s.img",body._data);
60340+ #pragma GCC diagnostic pop
6032960341 std::remove(command);
6033060342 return *this;
6033160343 }
@@ -64286,7 +64298,10 @@ namespace cimg_library {
6428664298
6428764299 CImg<charT> command(1024), filename_tmp(256), body(256);
6428864300 do {
64301+ #pragma GCC diagnostic push
64302+ #pragma GCC diagnostic ignored "-Wformat-truncation"
6428964303 cimg_snprintf(filename_tmp,filename_tmp._width,"%s.hdr",cimg::filenamerand());
64304+ #pragma GCC diagnostic pop
6429064305 } while (cimg::path_exists(filename_tmp));
6429164306 save_analyze(filename_tmp);
6429264307 cimg_snprintf(command,command._width,"\"%s\" -w -c dicom -o \"%s\" -f \"%s\"",
@@ -67933,7 +67948,10 @@ namespace cimg_library {
6793367948 cimg::temporary_path(),cimg_file_separator,cimg::filenamerand());
6793467949 cimg_snprintf(filename_tmp2,filename_tmp2._width,"%s_000001.ppm",filename_tmp._data);
6793567950 } while (cimg::path_exists(filename_tmp2));
67951+ #pragma GCC diagnostic push
67952+ #pragma GCC diagnostic ignored "-Wformat-truncation"
6793667953 cimg_snprintf(filename_tmp2,filename_tmp2._width,"%s_%%6d.ppm",filename_tmp._data);
67954+ #pragma GCC diagnostic pop
6793767955 cimg_snprintf(command,command._width,"\"%s\" -v -8 -i \"%s\" \"%s\"",
6793867956 cimg::ffmpeg_path(),
6793967957 CImg<charT>::string(filename)._system_strescape().data(),
@@ -69160,7 +69178,10 @@ namespace cimg_library {
6916069178 cimglist_for(*this,l) {
6916169179 CImg<T>& src = _data[l];
6916269180 cimg_forZ(src,z) {
69181+ #pragma GCC diagnostic push
69182+ #pragma GCC diagnostic ignored "-Wformat-truncation"
6916369183 cimg_snprintf(filename_tmp2,filename_tmp2._width,"%s_%.6u.ppm",filename_tmp._data,frame);
69184+ #pragma GCC diagnostic pop
6916469185 CImg<charT>::string(filename_tmp2).move_to(filenames);
6916569186 CImg<T> _src = src._depth>1?src.get_slice(z):src.get_shared();
6916669187 if (_src._width%2 || _src._height%2) // Force output to have an even number of columns and rows
0 commit comments