Commit a48c7cb28 for imagemagick.org
commit a48c7cb285ae1994b006cfbe7230c6a3545ecad2
Author: Dirk Lemstra <dirk@lemstra.org>
Date: Thu Feb 12 07:44:12 2026 +0100
Removed unused return value.
diff --git a/coders/meta.c b/coders/meta.c
index 73cfdc2c8..e6a10c207 100644
--- a/coders/meta.c
+++ b/coders/meta.c
@@ -1873,14 +1873,13 @@ static const tag_spec tags[] = {
{ 219, "Custom Field 20" }
};
-static int formatIPTC(Image *ifile, Image *ofile)
+static void formatIPTC(Image *ifile, Image *ofile)
{
char
temp[MagickPathExtent];
unsigned int
- foundiptc,
- tagsfound;
+ foundiptc;
unsigned char
recnum,
@@ -1902,7 +1901,6 @@ static int formatIPTC(Image *ifile, Image *ofile)
c;
foundiptc = 0; /* found the IPTC-Header */
- tagsfound = 0; /* number of tags found */
c = ReadBlobByte(ifile);
while (c != EOF)
@@ -1912,7 +1910,7 @@ static int formatIPTC(Image *ifile, Image *ofile)
else
{
if (foundiptc)
- return(-1);
+ return;
else
{
c=0;
@@ -1923,11 +1921,11 @@ static int formatIPTC(Image *ifile, Image *ofile)
/* we found the 0x1c tag and now grab the dataset and record number tags */
c = ReadBlobByte(ifile);
if (c == EOF)
- return(-1);
+ return;
dataset = (unsigned char) c;
c = ReadBlobByte(ifile);
if (c == EOF)
- return(-1);
+ return;
recnum = (unsigned char) c;
/* try to match this record to one of the ones in our named table */
for (i=0; i< tagcount; i++)
@@ -1944,9 +1942,9 @@ static int formatIPTC(Image *ifile, Image *ofile)
*/
c=ReadBlobByte(ifile);
if (c == EOF)
- return(-1);
+ return;
if (c & (unsigned char) 0x80)
- return(0);
+ return;
else
{
int
@@ -1954,23 +1952,23 @@ static int formatIPTC(Image *ifile, Image *ofile)
c0=ReadBlobByte(ifile);
if (c0 == EOF)
- return(-1);
+ return;
taglen = (c << 8) | c0;
}
if (taglen < 0)
- return(-1);
+ return;
/* make a buffer to hold the tag datand snag it from the input stream */
str=(unsigned char *) AcquireQuantumMemory((size_t) (taglen+
MagickPathExtent),sizeof(*str));
if (str == (unsigned char *) NULL)
- return(0);
+ return;
for (tagindx=0; tagindx<taglen; tagindx++)
{
c=ReadBlobByte(ifile);
if (c == EOF)
{
str=(unsigned char *) RelinquishMagickMemory(str);
- return(-1);
+ return;
}
str[tagindx] = (unsigned char) c;
}
@@ -1986,12 +1984,8 @@ static int formatIPTC(Image *ifile, Image *ofile)
(void) WriteBlobString(ofile,temp);
formatString( ofile, (char *)str, taglen );
str=(unsigned char *) RelinquishMagickMemory(str);
-
- tagsfound++;
-
c=ReadBlobByte(ifile);
}
- return((int) tagsfound);
}
static int readWordFromBuffer(char **s, ssize_t *len)