1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0029834: Coding Rules - eliminate GCC compiler warnings -Wformat-overflow in IGESData_IGESWriter

String buffers have been increased to be sufficient to accommodate result of sprintf() for any possible printed integer values.
This commit is contained in:
abv
2018-07-04 00:54:46 +03:00
committed by bugmaster
parent 4c4420dfe9
commit 5efab28a44
2 changed files with 3 additions and 3 deletions

View File

@@ -482,7 +482,7 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
Standard_Boolean fnes = (themodew >= 10);
if(!isGood)
return isGood;
char ligne[81];
char ligne[256];
#ifdef PATIENCELOG
Standard_Integer lignespatience = 1000;
#endif
@@ -590,7 +590,7 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
blancs[MaxcarsP] = '\0';
for (i = 1; i <= nbd && isGood; i ++) {
for (Standard_Integer j = thepnum.Value(i); j < thepnum.Value(i+1); j ++) {
char finlin[20];
char finlin[32];
sprintf(finlin," %7.7dP%7.7d",2*i-1,j);
line = thepars->Value(j);
// line->LeftJustify(MaxcarsP,' '); remplace par plus economique ! :