Anonymous | Login | 2021-01-23 13:27 MSK | ![]() |
My View | View Issues | Change Log | Roadmap |
View Revisions: Issue #29252 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0029252: Coding rules - eliminate GCC compiler warnings -Wformat-overflow | ||
Revision | 2017-10-21 21:10 by kgv | ||
Description | The following GCC 7.2.0 compiler warnings should be eliminated./occt.git/src/OSD/OSD_DirectoryIterator.cxx: In member function ‘void OSD_DirectoryIterator::Next()’: /occt.git/src/OSD/OSD_DirectoryIterator.cxx:100:6: warning: ‘%s’ directive writing up to 255 bytes into a region of size 254 [-Wformat-overflow=] void OSD_DirectoryIterator::Next(){ ^~~~~~~~~~~~~~~~~~~~~ /occt.git/src/OSD/OSD_DirectoryIterator.cxx:123:13: note: ‘sprintf’ output 2 or more bytes (assuming 257) into a destination of size 255 sprintf(full_name,"%s/%s",myPlace.ToCString(), ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ((struct dirent *)myEntry)->d_name); // LD debug ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /occt.git/src/OSD/OSD_FileIterator.cxx: In member function ‘void OSD_FileIterator::Next()’: /occt.git/src/OSD/OSD_FileIterator.cxx:176:6: warning: ‘%s’ directive writing up to 255 bytes into a region of size 254 [-Wformat-overflow=] void OSD_FileIterator::Next(){ ^~~~~~~~~~~~~~~~ /occt.git/src/OSD/OSD_FileIterator.cxx:199:13: note: ‘sprintf’ output 2 or more bytes (assuming 257) into a destination of size 255 sprintf(full_name,"%s/%s",myPlace.ToCString(), ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ((struct dirent *)myEntry)->d_name); // LD debug ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ||=== Build finished: 0 error(s), 2 warning(s) (17 minute(s), 37 second(s)) ===| |
||
Revision | 2017-10-21 21:07 by kgv | ||
Description | The following GCC 7.2.0 compiler warnings should be eliminated. ||=== Build: Debug in TKernel (compiler: GNU GCC Compiler) ===| /occt.git/src/OSD/OSD_DirectoryIterator.cxx||In member function ‘void OSD_DirectoryIterator::Next()’:| /occt.git/src/OSD/OSD_DirectoryIterator.cxx|100|warning: ‘%s’ directive writing up to 255 bytes into a region of size 254 [-Wformat-overflow=]| /occt.git/src/OSD/OSD_DirectoryIterator.cxx|123|note: ‘sprintf’ output 2 or more bytes (assuming 257) into a destination of size 255| /occt.git/src/OSD/OSD_FileIterator.cxx||In member function ‘void OSD_FileIterator::Next()’:| /occt.git/src/OSD/OSD_FileIterator.cxx|176|warning: ‘%s’ directive writing up to 255 bytes into a region of size 254 [-Wformat-overflow=]| /occt.git/src/OSD/OSD_FileIterator.cxx|199|note: ‘sprintf’ output 2 or more bytes (assuming 257) into a destination of size 255| ||=== Build finished: 0 error(s), 2 warning(s) (17 minute(s), 37 second(s)) ===| |
Copyright © 2000 - 2021 MantisBT Team |