GraphicsMagick: BMP and DIB: Eliminate GCC 14 warning.
GraphicsMagick Commits <[email protected]> Fri, 26 Jul 2024 17:20:31 -0500
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.6166.1722032446.1470.graphicsmagick-commit@lists.sourceforge.net> |
changeset fa1287ef263d in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=3Dchangeset;nod= e=3Dfa1287ef263d summary: BMP and DIB: Eliminate GCC 14 warning. diffstat: ChangeLog | 8 + VisualMagick/installer/inc/version.isx | 4 +- coders/bmp.c | 4 +- coders/dib.c | 4 +- configure | 2 +- configure.ac | 2 +- magick/version.h | 4 +- www/ChangeLog.html | 8 + www/api/quantize.html | 138 ++++++++++++++++------------= ---- 9 files changed, 95 insertions(+), 79 deletions(-) diffs (392 lines): diff -r 7ff15be04d17 -r fa1287ef263d ChangeLog --- a/ChangeLog Thu Jul 25 16:14:09 2024 -0500 +++ b/ChangeLog Fri Jul 26 17:20:00 2024 -0500 @@ -1,3 +1,11 @@ +2024-07-26 Bob Friesenhahn <[email protected]> + + * configure.ac: Remove defunct LIB_GS variable. + + * coders/dib.c (ReadDIBImage): Eliminate GCC 14 warning. + + * coders/bmp.c (ReadBMPImage): Eliminate GCC 14 warning. + 2024-07-25 Bob Friesenhahn <[email protected]> = * configure.ac: Add LIB_FPX and LIB_GS back into the LIBS diff -r 7ff15be04d17 -r fa1287ef263d VisualMagick/installer/inc/version.isx --- a/VisualMagick/installer/inc/version.isx Thu Jul 25 16:14:09 2024 -0500 +++ b/VisualMagick/installer/inc/version.isx Fri Jul 26 17:20:00 2024 -0500 @@ -10,5 +10,5 @@ = #define public MagickPackageName "GraphicsMagick" #define public MagickPackageVersion "1.4" -#define public MagickPackageVersionAddendum ".020240725" -#define public MagickPackageReleaseDate "snapshot-20240725" +#define public MagickPackageVersionAddendum ".020240726" +#define public MagickPackageReleaseDate "snapshot-20240726" diff -r 7ff15be04d17 -r fa1287ef263d coders/bmp.c --- a/coders/bmp.c Thu Jul 25 16:14:09 2024 -0500 +++ b/coders/bmp.c Fri Jul 26 17:20:00 2024 -0500 @@ -1,5 +1,5 @@ /* -% Copyright (C) 2003 - 2024 GraphicsMagick Group +% Copyright (C) 2003-2024 GraphicsMagick Group % Copyright (C) 2002 ImageMagick Studio % Copyright 1991-1999 E. I. du Pont de Nemours and Company % @@ -1407,7 +1407,7 @@ image); } = - if (~((size_t) 0) - image->columns < 1) + if ((image->columns+1UL) < image->columns) ThrowBMPReaderException(CoderError,ArithmeticOverflow,image); pixels_size=3DMagickArraySize(Max(bytes_per_line,(size_t) image->col= umns+1), image->rows); diff -r 7ff15be04d17 -r fa1287ef263d coders/dib.c --- a/coders/dib.c Thu Jul 25 16:14:09 2024 -0500 +++ b/coders/dib.c Fri Jul 26 17:20:00 2024 -0500 @@ -1,5 +1,5 @@ /* -% Copyright (C) 2003-2020 GraphicsMagick Group +% Copyright (C) 2003-2024 GraphicsMagick Group % Copyright (C) 2002 ImageMagick Studio % % This program is covered by multiple licenses, which are described in @@ -765,7 +765,7 @@ length=3DMagickArraySize(bytes_per_line,image->rows); if (length =3D=3D 0) ThrowReaderException(CoderError,ArithmeticOverflow,image); - if (~((size_t) 0) - image->columns < 1) + if ((image->columns+1UL) < image->columns) ThrowReaderException(CoderError,ArithmeticOverflow,image); pixels_size=3DMagickArraySize(image->rows,Max(bytes_per_line,(size_t) im= age->columns+1)); if (pixels_size =3D=3D 0) diff -r 7ff15be04d17 -r fa1287ef263d configure --- a/configure Thu Jul 25 16:14:09 2024 -0500 +++ b/configure Fri Jul 26 17:20:00 2024 -0500 @@ -34675,7 +34675,7 @@ if test "$build_modules" !=3D 'no' then MAGICK_DEP_LIBS=3D'' - for token in $LIB_FPX $LCMS2_LIBS $FREETYPE_LIBS $LIB_GS $LIB_DPS $LIB_X= EXT $LIB_IPC $LIB_X11 $LIB_BZLIB $ZLIB_LIBS $LIB_LTDL $LIB_TRIO $LIB_GDI32 = $LIBS_USER $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC + for token in $LIB_FPX $LCMS2_LIBS $FREETYPE_LIBS $LIB_DPS $LIB_XEXT $LIB= _IPC $LIB_X11 $LIB_BZLIB $ZLIB_LIBS $LIB_LTDL $LIB_TRIO $LIB_GDI32 $LIBS_US= ER $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC do case $token in -l*) diff -r 7ff15be04d17 -r fa1287ef263d configure.ac --- a/configure.ac Thu Jul 25 16:14:09 2024 -0500 +++ b/configure.ac Fri Jul 26 17:20:00 2024 -0500 @@ -4286,7 +4286,7 @@ if test "$build_modules" !=3D 'no' then MAGICK_DEP_LIBS=3D'' - for token in $LIB_FPX $LCMS2_LIBS $FREETYPE_LIBS $LIB_GS $LIB_DPS $LIB_X= EXT $LIB_IPC $LIB_X11 $LIB_BZLIB $ZLIB_LIBS $LIB_LTDL $LIB_TRIO $LIB_GDI32 = $LIBS_USER $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC + for token in $LIB_FPX $LCMS2_LIBS $FREETYPE_LIBS $LIB_DPS $LIB_XEXT $LIB= _IPC $LIB_X11 $LIB_BZLIB $ZLIB_LIBS $LIB_LTDL $LIB_TRIO $LIB_GDI32 $LIBS_US= ER $LIB_MATH $LIB_THREAD $LIB_TCMALLOC $LIB_UMEM $LIB_MTMALLOC do case $token in -l*) diff -r 7ff15be04d17 -r fa1287ef263d magick/version.h --- a/magick/version.h Thu Jul 25 16:14:09 2024 -0500 +++ b/magick/version.h Fri Jul 26 17:20:00 2024 -0500 @@ -38,8 +38,8 @@ #define MagickLibVersion 0x282500 #define MagickLibVersionText "1.4" #define MagickLibVersionNumber 28,25,0 -#define MagickChangeDate "20240725" -#define MagickReleaseDate "snapshot-20240725" +#define MagickChangeDate "20240726" +#define MagickReleaseDate "snapshot-20240726" = /* The MagickLibInterfaceNewest and MagickLibInterfaceOldest defines diff -r 7ff15be04d17 -r fa1287ef263d www/ChangeLog.html --- a/www/ChangeLog.html Thu Jul 25 16:14:09 2024 -0500 +++ b/www/ChangeLog.html Fri Jul 26 17:20:00 2024 -0500 @@ -38,6 +38,14 @@ = <main id=3D"graphicsmagick-changelog"> <h1 class=3D"title">GraphicsMagick ChangeLog</h1> +<p>2024-07-26 Bob Friesenhahn <<a class=3D"reference external" href= =3D"mailto:bfriesen%40simple.dallas.tx.us">bfriesen= <span>@</span>simple<span>.</span>dallas<span>.</span>tx<span>&= #46;</span>us</a>></p> +<blockquote> +<ul class=3D"simple"> +<li><p>configure.ac: Remove defunct LIB_GS variable.</p></li> +<li><p>coders/dib.c (ReadDIBImage): Eliminate GCC 14 warning.</p></li> +<li><p>coders/bmp.c (ReadBMPImage): Eliminate GCC 14 warning.</p></li> +</ul> +</blockquote> <p>2024-07-25 Bob Friesenhahn <<a class=3D"reference external" href= =3D"mailto:bfriesen%40simple.dallas.tx.us">bfriesen= <span>@</span>simple<span>.</span>dallas<span>.</span>tx<span>&= #46;</span>us</a>></p> <blockquote> <ul class=3D"simple"> diff -r 7ff15be04d17 -r fa1287ef263d www/api/quantize.html --- a/www/api/quantize.html Thu Jul 25 16:14:09 2024 -0500 +++ b/www/api/quantize.html Fri Jul 26 17:20:00 2024 -0500 @@ -36,7 +36,7 @@ </ul> </div> = -<div class=3D"document" id=3D"quantize"> +<main id=3D"quantize"> <h1 class=3D"title">quantize</h1> <p class=3D"subtitle" id=3D"reduce-the-number-of-colors-in-an-image">Reduc= e the number of colors in an image</p> <div class=3D"contents topic" id=3D"contents"> @@ -55,13 +55,13 @@ <li><p><a class=3D"reference internal" href=3D"#quantizeimages" id=3D"id31= ">QuantizeImages</a></p></li> </ul> </div> -<div class=3D"section" id=3D"clonequantizeinfo"> +<section id=3D"clonequantizeinfo"> <h1><a class=3D"toc-backref" href=3D"#id21">CloneQuantizeInfo</a></h1> -<div class=3D"section" id=3D"synopsis"> +<section id=3D"synopsis"> <h2>Synopsis</h2> <pre class=3D"literal-block"><a class=3D"reference external" href=3D"../ap= i/types.html#quantizeinfo">QuantizeInfo</a> *CloneQuantizeInfo( const <a cl= ass=3D"reference external" href=3D"../api/types.html#quantizeinfo">Quantize= Info</a> *quantize_info );</pre> -</div> -<div class=3D"section" id=3D"description"> +</section> +<section id=3D"description"> <h2>Description</h2> <p>CloneQuantizeInfo() makes a duplicate of the given quantize info struct= ure, or if quantize info is NULL, a new one.</p> @@ -77,15 +77,15 @@ <dd><p>a structure of type info.</p> </dd> </dl> -</div> -</div> -<div class=3D"section" id=3D"compressimagecolormap"> +</section> +</section> +<section id=3D"compressimagecolormap"> <h1><a class=3D"toc-backref" href=3D"#id22">CompressImageColormap</a></h1> -<div class=3D"section" id=3D"id1"> +<section id=3D"id1"> <h2>Synopsis</h2> <pre class=3D"literal-block">void CompressImageColormap( <a class=3D"refer= ence external" href=3D"../api/types.html#image">Image</a> *image );</pre> -</div> -<div class=3D"section" id=3D"id2"> +</section> +<section id=3D"id2"> <h2>Description</h2> <p>CompressImageColormap() compresses an image colormap by removing any duplicate or unused color entries.</p> @@ -97,15 +97,15 @@ <dd><p>The image.</p> </dd> </dl> -</div> -</div> -<div class=3D"section" id=3D"destroyquantizeinfo"> +</section> +</section> +<section id=3D"destroyquantizeinfo"> <h1><a class=3D"toc-backref" href=3D"#id23">DestroyQuantizeInfo</a></h1> -<div class=3D"section" id=3D"id3"> +<section id=3D"id3"> <h2>Synopsis</h2> <pre class=3D"literal-block">DestroyQuantizeInfo( <a class=3D"reference ex= ternal" href=3D"../api/types.html#quantizeinfo">QuantizeInfo</a> *quantize_= info );</pre> -</div> -<div class=3D"section" id=3D"id4"> +</section> +<section id=3D"id4"> <h2>Description</h2> <p>DestroyQuantizeInfo() deallocates memory associated with an QuantizeInfo structure.</p> @@ -117,15 +117,15 @@ <dd><p>Specifies a pointer to an QuantizeInfo structure.</p> </dd> </dl> -</div> -</div> -<div class=3D"section" id=3D"getimagequantizeerror"> +</section> +</section> +<section id=3D"getimagequantizeerror"> <h1><a class=3D"toc-backref" href=3D"#id24">GetImageQuantizeError</a></h1> -<div class=3D"section" id=3D"id5"> +<section id=3D"id5"> <h2>Synopsis</h2> <pre class=3D"literal-block">unsigned int GetImageQuantizeError( <a class= =3D"reference external" href=3D"../api/types.html#image">Image</a> *image )= ;</pre> -</div> -<div class=3D"section" id=3D"id6"> +</section> +<section id=3D"id6"> <h2>Description</h2> <p>GetImageQuantizeError() measures the difference between the original and quantized images. This difference is the total quantization error. @@ -151,15 +151,15 @@ ReadImage.</p> </dd> </dl> -</div> -</div> -<div class=3D"section" id=3D"getquantizeinfo"> +</section> +</section> +<section id=3D"getquantizeinfo"> <h1><a class=3D"toc-backref" href=3D"#id25">GetQuantizeInfo</a></h1> -<div class=3D"section" id=3D"id7"> +<section id=3D"id7"> <h2>Synopsis</h2> <pre class=3D"literal-block">GetQuantizeInfo( <a class=3D"reference extern= al" href=3D"../api/types.html#quantizeinfo">QuantizeInfo</a> *quantize_info= );</pre> -</div> -<div class=3D"section" id=3D"id8"> +</section> +<section id=3D"id8"> <h2>Description</h2> <p>GetQuantizeInfo() initializes the QuantizeInfo structure.</p> <p>The format of the GetQuantizeInfo method is:</p> @@ -170,15 +170,15 @@ <dd><p>Specifies a pointer to a QuantizeInfo structure.</p> </dd> </dl> -</div> -</div> -<div class=3D"section" id=3D"grayscalepseudoclassimage"> +</section> +</section> +<section id=3D"grayscalepseudoclassimage"> <h1><a class=3D"toc-backref" href=3D"#id26">GrayscalePseudoClassImage</a><= /h1> -<div class=3D"section" id=3D"id9"> +<section id=3D"id9"> <h2>Synopsis</h2> <pre class=3D"literal-block">void GrayscalePseudoClassImage( <a class=3D"r= eference external" href=3D"../api/types.html#image">Image</a> *image );</pr= e> -</div> -<div class=3D"section" id=3D"id10"> +</section> +<section id=3D"id10"> <h2>Description</h2> <p>GrayscalePseudoClassImage converts an image to a PseudoClass grayscale representation with an (optionally) compressed and sorted @@ -194,16 +194,16 @@ <dd><p>If true, produce an optimimal (compact) colormap.</p> </dd> </dl> -</div> -</div> -<div class=3D"section" id=3D"mapimage"> +</section> +</section> +<section id=3D"mapimage"> <h1><a class=3D"toc-backref" href=3D"#id27">MapImage</a></h1> -<div class=3D"section" id=3D"id11"> +<section id=3D"id11"> <h2>Synopsis</h2> <pre class=3D"literal-block">unsigned int MapImage( <a class=3D"reference = external" href=3D"../api/types.html#image">Image</a> *image, const <a class= =3D"reference external" href=3D"../api/types.html#image">Image</a> *map_ima= ge, const unsigned int dither );</pre> -</div> -<div class=3D"section" id=3D"id12"> +</section> +<section id=3D"id12"> <h2>Description</h2> <p>MapImage() replaces the colors of an image with the closest color from a reference image.</p> @@ -223,15 +223,15 @@ dither the quantized image.</p> </dd> </dl> -</div> -</div> -<div class=3D"section" id=3D"mapimages"> +</section> +</section> +<section id=3D"mapimages"> <h1><a class=3D"toc-backref" href=3D"#id28">MapImages</a></h1> -<div class=3D"section" id=3D"id13"> +<section id=3D"id13"> <h2>Synopsis</h2> <pre class=3D"literal-block">unsigned int MapImages( <a class=3D"reference= external" href=3D"../api/types.html#image">Image</a> *images, <a class=3D"= reference external" href=3D"../api/types.html#image">Image</a> *map_image, = const unsigned int dither );</pre> -</div> -<div class=3D"section" id=3D"id14"> +</section> +<section id=3D"id14"> <h2>Description</h2> <p>MapImages() replaces the colors of a sequence of images with the closest color from a reference image. If the reference image does not contain a @@ -255,15 +255,15 @@ dither the quantized image.</p> </dd> </dl> -</div> -</div> -<div class=3D"section" id=3D"orderedditherimage"> +</section> +</section> +<section id=3D"orderedditherimage"> <h1><a class=3D"toc-backref" href=3D"#id29">OrderedDitherImage</a></h1> -<div class=3D"section" id=3D"id15"> +<section id=3D"id15"> <h2>Synopsis</h2> <pre class=3D"literal-block">unsigned int OrderedDitherImage( <a class=3D"= reference external" href=3D"../api/types.html#image">Image</a> *image );</p= re> -</div> -<div class=3D"section" id=3D"id16"> +</section> +<section id=3D"id16"> <h2>Description</h2> <p>OrderedDitherImage() uses the ordered dithering technique of reducing c= olor images to monochrome using positional information to retain as much @@ -277,15 +277,15 @@ ReadImage.</p> </dd> </dl> -</div> -</div> -<div class=3D"section" id=3D"quantizeimage"> +</section> +</section> +<section id=3D"quantizeimage"> <h1><a class=3D"toc-backref" href=3D"#id30">QuantizeImage</a></h1> -<div class=3D"section" id=3D"id17"> +<section id=3D"id17"> <h2>Synopsis</h2> <pre class=3D"literal-block">unsigned int QuantizeImage( const <a class=3D= "reference external" href=3D"../api/types.html#quantizeinfo">QuantizeInfo</= a> *quantize_info, <a class=3D"reference external" href=3D"../api/types.htm= l#image">Image</a> *image );</pre> -</div> -<div class=3D"section" id=3D"id18"> +</section> +<section id=3D"id18"> <h2>Description</h2> <p>QuantizeImage() analyzes the colors within a reference image and choose= s a fixed number of colors to represent the image. The goal of the algorithm @@ -301,15 +301,15 @@ <dd><p>Specifies a pointer to an Image structure.</p> </dd> </dl> -</div> -</div> -<div class=3D"section" id=3D"quantizeimages"> +</section> +</section> +<section id=3D"quantizeimages"> <h1><a class=3D"toc-backref" href=3D"#id31">QuantizeImages</a></h1> -<div class=3D"section" id=3D"id19"> +<section id=3D"id19"> <h2>Synopsis</h2> <pre class=3D"literal-block">unsigned int QuantizeImages( const <a class= =3D"reference external" href=3D"../api/types.html#quantizeinfo">QuantizeInf= o</a> *quantize_info, <a class=3D"reference external" href=3D"../api/types.= html#image">Image</a> *images );</pre> -</div> -<div class=3D"section" id=3D"id20"> +</section> +<section id=3D"id20"> <h2>Description</h2> <p>QuantizeImages() analyzes the colors within a set of reference images a= nd chooses a fixed number of colors to represent the set. The goal of the @@ -325,9 +325,9 @@ <dd><p>Specifies a pointer to a list of Image structures.</p> </dd> </dl> -</div> -</div> -</div> +</section> +</section> +</main> = = <hr class=3D"docutils"> @@ -335,6 +335,6 @@ <p><a href=3D"../Copyright.html">Copyright</a> =A9 GraphicsMagick Grou= p 2002 - 2024<!--SPONSOR_LOGO--></p> </div> = -</div> +</main> </body> </html>