@@ -630,10 +630,10 @@ class Int64Option : public Option
630630 void checkValueOrExit (int64_t tmp)
631631 {
632632 if (tmp > range.end ) {
633- fprintf (stderr, " ERROR! value <%ld > is too large for option \" %s\" .\n " , tmp, name);
633+ fprintf (stderr, " ERROR! value <%" PRId64 " > is too large for option \" %s\" .\n " , tmp, name);
634634 exit (1 );
635635 } else if (tmp < range.begin ) {
636- fprintf (stderr, " ERROR! value <%ld > is too small for option \" %s\" .\n " , tmp, name);
636+ fprintf (stderr, " ERROR! value <%" PRId64 " > is too small for option \" %s\" .\n " , tmp, name);
637637 exit (1 );
638638 }
639639 }
@@ -734,23 +734,25 @@ class Int64Option : public Option
734734 if (i != 0 ) {
735735 fprintf (pcsFile, " ," );
736736 }
737- fprintf (pcsFile, " %ld " , values[i]);
737+ fprintf (pcsFile, " %" PRId64 , values[i]);
738738 }
739- fprintf (pcsFile, " } [%ld ] # %s\n " , value, description);
739+ fprintf (pcsFile, " } [%" PRId64 " ] # %s\n " , value, description);
740740 } else {
741741 if ((range.end - range.begin <= 16 && range.end - range.begin > 0 && range.end != INT32_MAX) ||
742742 (range.begin <= 0 && range.end >= 0 )) {
743743 if (range.end - range.begin <= 16 && range.end - range.begin > 0 ) { // print all values if the difference is really small
744- fprintf (pcsFile, " %s {%ld " , name, range.begin );
744+ fprintf (pcsFile, " %s {%" PRId64 , name, range.begin );
745745 for (int64_t i = range.begin + 1 ; i <= range.end ; ++i) {
746- fprintf (pcsFile, " ,%ld " , i);
746+ fprintf (pcsFile, " ,%" PRId64 , i);
747747 }
748- fprintf (pcsFile, " } [%ld ] # %s\n " , value, description);
748+ fprintf (pcsFile, " } [%" PRId64 " ] # %s\n " , value, description);
749749 } else {
750- fprintf (pcsFile, " %s [%ld,%ld] [%ld]i # %s\n " , name, range.begin , range.end , value, description);
750+ fprintf (pcsFile, " %s [%" PRId64 " ,%" PRId64 " ] [%" PRId64 " ]i # %s\n " , name, range.begin ,
751+ range.end , value, description);
751752 }
752753 } else {
753- fprintf (pcsFile, " %s [%ld,%ld] [%ld]il # %s\n " , name, range.begin , range.end , value, description);
754+ fprintf (pcsFile, " %s [%" PRId64 " ,%" PRId64 " ] [%" PRId64 " ]il # %s\n " , name, range.begin , range.end ,
755+ value, description);
754756 }
755757 }
756758 }
@@ -768,8 +770,8 @@ class Int64Option : public Option
768770 for (size_t i = 0 ; i < values.size (); ++i) {
769771 if (values[i] == defaultValue) {
770772 continue ;
771- } // do not print default value
772- snprintf (buffer, size, " %ld " , values[i]); // convert value
773+ } // do not print default value
774+ snprintf (buffer, size, " %" PRId64 , values[i]); // convert value
773775 const int sl = strlen (buffer);
774776 size = size - strlen (buffer) - 1 ; // store new size
775777 if (i + 1 < values.size () && values[i + 1 ] != defaultValue) {
@@ -782,8 +784,8 @@ class Int64Option : public Option
782784 for (int64_t i = range.begin ; i <= range.end ; ++i) {
783785 if (i == defaultValue) {
784786 continue ;
785- } // do not print default value
786- snprintf (buffer, size, " %ld " , i); // convert value
787+ } // do not print default value
788+ snprintf (buffer, size, " %" PRId64 , i); // convert value
787789 const int sl = strlen (buffer);
788790 size = size - strlen (buffer) - 1 ; // store new size
789791 if (i != range.end && i + 1 != defaultValue) {
0 commit comments