GraphicsMagick: tests: Fix GCC 13 warnings related to strncpy()
GraphicsMagick Commits <[email protected]> Wed, 20 Sep 2023 08:06:14 -0500
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.2295.1695215185.1961.graphicsmagick-commit@lists.sourceforge.net> |
changeset b968f0494cd7 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=b968f0494cd7 summary: tests: Fix GCC 13 warnings related to strncpy() diffstat: ChangeLog | 5 +++++ VisualMagick/installer/inc/version.isx | 4 ++-- magick/version.h | 4 ++-- tests/constitute.c | 4 ++-- tests/drawtest.c | 2 +- tests/rwblob.c | 4 ++-- tests/rwfile.c | 4 ++-- www/Changelog.html | 7 +++++++ 8 files changed, 23 insertions(+), 11 deletions(-) diffs (114 lines): diff -r e8332619326f -r b968f0494cd7 ChangeLog --- a/ChangeLog Tue Sep 19 08:23:09 2023 -0500 +++ b/ChangeLog Wed Sep 20 08:06:11 2023 -0500 @@ -1,3 +1,8 @@ +2023-09-20 Bob Friesenhahn <[email protected]> + + * tests/{constitute.c, drawtest.c, rwblob.c, rwfile.c}: Fix GCC 13 + warning. + 2023-09-19 Fojtik Jaroslav <[email protected]> * VisualMagick/tests/runtest.bat VID is not a regular image format. diff -r e8332619326f -r b968f0494cd7 VisualMagick/installer/inc/version.isx --- a/VisualMagick/installer/inc/version.isx Tue Sep 19 08:23:09 2023 -0500 +++ b/VisualMagick/installer/inc/version.isx Wed Sep 20 08:06:11 2023 -0500 @@ -10,5 +10,5 @@ #define public MagickPackageName "GraphicsMagick" #define public MagickPackageVersion "1.4" -#define public MagickPackageVersionAddendum ".020230919" -#define public MagickPackageReleaseDate "snapshot-20230919" +#define public MagickPackageVersionAddendum ".020230920" +#define public MagickPackageReleaseDate "snapshot-20230920" diff -r e8332619326f -r b968f0494cd7 magick/version.h --- a/magick/version.h Tue Sep 19 08:23:09 2023 -0500 +++ b/magick/version.h Wed Sep 20 08:06:11 2023 -0500 @@ -38,8 +38,8 @@ #define MagickLibVersion 0x272403 #define MagickLibVersionText "1.4" #define MagickLibVersionNumber 27,24,3 -#define MagickChangeDate "20230919" -#define MagickReleaseDate "snapshot-20230919" +#define MagickChangeDate "20230920" +#define MagickReleaseDate "snapshot-20230920" /* The MagickLibInterfaceNewest and MagickLibInterfaceOldest defines diff -r e8332619326f -r b968f0494cd7 tests/constitute.c --- a/tests/constitute.c Tue Sep 19 08:23:09 2023 -0500 +++ b/tests/constitute.c Wed Sep 20 08:06:11 2023 -0500 @@ -177,10 +177,10 @@ goto program_exit; } - (void) strncpy(infile, argv[arg], MaxTextExtent ); + (void) strncpy(infile, argv[arg], MaxTextExtent-1 ); infile[MaxTextExtent-1]='\0'; arg++; - (void) strncpy( map, argv[arg], MaxTextExtent ); + (void) strncpy( map, argv[arg], MaxTextExtent-1 ); map[MaxTextExtent-1]='\0'; /* for (arg=0; arg < argc; arg++) */ diff -r e8332619326f -r b968f0494cd7 tests/drawtest.c --- a/tests/drawtest.c Tue Sep 19 08:23:09 2023 -0500 +++ b/tests/drawtest.c Wed Sep 20 08:06:11 2023 -0500 @@ -360,7 +360,7 @@ exit( 1 ); } - (void) strncpy( outfile, argv[1], MaxTextExtent); + (void) strncpy( outfile, argv[1], MaxTextExtent-1); outfile[MaxTextExtent-1]='\0'; /* diff -r e8332619326f -r b968f0494cd7 tests/rwblob.c --- a/tests/rwblob.c Tue Sep 19 08:23:09 2023 -0500 +++ b/tests/rwblob.c Wed Sep 20 08:06:11 2023 -0500 @@ -192,10 +192,10 @@ goto program_exit; } - (void) strncpy(infile, argv[arg], MaxTextExtent); + (void) strncpy(infile, argv[arg], MaxTextExtent-1); infile[MaxTextExtent-1]='\0'; arg++; - (void) strncpy( format, argv[arg], MaxTextExtent); + (void) strncpy( format, argv[arg], MaxTextExtent-1); format[MaxTextExtent-1]='\0'; magick_info=GetMagickInfo(format,&exception); diff -r e8332619326f -r b968f0494cd7 tests/rwfile.c --- a/tests/rwfile.c Tue Sep 19 08:23:09 2023 -0500 +++ b/tests/rwfile.c Wed Sep 20 08:06:11 2023 -0500 @@ -207,10 +207,10 @@ goto program_exit; } - (void) strncpy(infile, argv[arg], MaxTextExtent ); + (void) strncpy(infile, argv[arg], MaxTextExtent-1 ); infile[MaxTextExtent-1]='\0'; arg++; - (void) strncpy( format, argv[arg], MaxTextExtent ); + (void) strncpy( format, argv[arg], MaxTextExtent-1 ); format[MaxTextExtent-1]='\0'; magick_info=GetMagickInfo(format,&exception); diff -r e8332619326f -r b968f0494cd7 www/Changelog.html --- a/www/Changelog.html Tue Sep 19 08:23:09 2023 -0500 +++ b/www/Changelog.html Wed Sep 20 08:06:11 2023 -0500 @@ -37,6 +37,13 @@ </div> <div class="document"> +<p>2023-09-20 Bob Friesenhahn <<a class="reference external" href="mailto:bfriesen%40simple.dallas.tx.us">bfriesen<span>@</span>simple<span>.</span>dallas<span>.</span>tx<span>.</span>us</a>></p> +<blockquote> +<ul class="simple"> +<li><p>tests/{constitute.c, drawtest.c, rwblob.c, rwfile.c}: Fix GCC 13 +warning.</p></li> +</ul> +</blockquote> <p>2023-09-19 Fojtik Jaroslav <<a class="reference external" href="mailto:JaFojtik%40yandex.com">JaFojtik<span>@</span>yandex<span>.</span>com</a>></p> <blockquote> <ul class="simple">