[prev in list] [next in list] [prev in thread] [next in thread]
List: graphicsmagick-commit
Subject: [GM-commit] GraphicsMagick: Changes to compile clean under GCC with -std=c90.
From: GraphicsMagick Commits <graphicsmagick-commit () lists ! sourceforge ! net>
Date: 2016-08-09 2:54:24
Message-ID: hg.1d2d4e76704d.1470711264.2950750188400161634 () src ! simplesystems ! org
[Download RAW message or body]
changeset 1d2d4e76704d in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=1d2d4e76704d
summary: Changes to compile clean under GCC with -std=c90.
diffstat:
ChangeLog | 2 +
VisualMagick/installer/inc/version.isx | 4 +-
coders/mat.c | 14 ++++++------
coders/meta.c | 3 +-
coders/msl.c | 21 ++++++++++++------
coders/pcd.c | 4 ++-
coders/pnm.c | 4 +-
coders/ps3.c | 3 +-
coders/svg.c | 12 ++++++---
coders/tiff.c | 10 ++++++--
coders/wmf.c | 22 +++++++++++++-----
coders/wpg.c | 2 +-
coders/x.c | 3 +-
filters/analyze.c | 5 +++-
magick/annotate.c | 9 +++++--
magick/attribute.c | 7 ++++-
magick/command.c | 23 +++++++++++++------
magick/compress.c | 6 +++-
magick/display.c | 3 +-
magick/map.c | 3 +-
magick/render.c | 4 ++-
magick/resize.c | 39 ++++++++++++++++++++++-----------
magick/resource.c | 4 ++-
magick/utility.h | 2 -
magick/version.h | 4 +-
magick/xwindow.c | 6 +++-
www/Changelog.html | 10 ++++++++
27 files changed, 155 insertions(+), 74 deletions(-)
diffs (truncated from 824 to 500 lines):
diff -r fe96878b901b -r 1d2d4e76704d ChangeLog
--- a/ChangeLog Mon Aug 08 08:39:31 2016 -0500
+++ b/ChangeLog Mon Aug 08 21:54:21 2016 -0500
@@ -1,5 +1,7 @@
2016-08-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders, magick: Compile clean using GCC with -std=c90.
+
* magick/describe.c (DescribeImage): The 'identify' and 'info'
functionality only shows the pixel read rate if image was not read
in 'ping' mode. Provide seconds timing with 6 digits of precision
diff -r fe96878b901b -r 1d2d4e76704d VisualMagick/installer/inc/version.isx
--- a/VisualMagick/installer/inc/version.isx Mon Aug 08 08:39:31 2016 -0500
+++ b/VisualMagick/installer/inc/version.isx Mon Aug 08 21:54:21 2016 -0500
@@ -10,5 +10,5 @@
#define public MagickPackageName "GraphicsMagick"
#define public MagickPackageVersion "1.4"
-#define public MagickPackageVersionAddendum ".020160807"
-#define public MagickPackageReleaseDate "snapshot-20160807"
+#define public MagickPackageVersionAddendum ".020160808"
+#define public MagickPackageReleaseDate "snapshot-20160808"
diff -r fe96878b901b -r 1d2d4e76704d coders/mat.c
--- a/coders/mat.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/mat.c Mon Aug 08 21:54:21 2016 -0500
@@ -540,7 +540,7 @@
if(CheckImagePixelLimits(image, exception) != MagickPass)
{
return NULL;
- //ThrowReaderException(ResourceLimitError,ImagePixelLimitExceeded,image);
+ /* ThrowReaderException(ResourceLimitError,ImagePixelLimitExceeded,image); */
}
/* If ping is true, then only set image size and colors without reading any image \
data. */ @@ -578,15 +578,15 @@
q = SetImagePixels(image, 0, HDR.nCols-i-1, image->columns, 1);
if(q == (PixelPacket *)NULL)
{
- //if (logging) (void)LogMagickEvent(CoderEvent,GetMagickModule(),
- // " MAT set image pixels returns unexpected NULL on a row %u.", \
(unsigned)(MATLAB_HDR.SizeY-i-1)); + /* if (logging) \
(void)LogMagickEvent(CoderEvent,GetMagickModule(), */ + /* " MAT set \
image pixels returns unexpected NULL on a row %u.", \
(unsigned)(MATLAB_HDR.SizeY-i-1)); */
goto done_reading; /* Skip image rotation, when cannot set image pixels */
}
if(ReadBlob(image,ldblk,(char *)BImgBuff) != (size_t)ldblk)
{
- //if (logging) (void)LogMagickEvent(CoderEvent,GetMagickModule(),
- // " MAT cannot read scanrow %u from a file.", \
(unsigned)(MATLAB_HDR.SizeY-i-1)); + /* if (logging) \
(void)LogMagickEvent(CoderEvent,GetMagickModule(), */ + /* " MAT cannot \
read scanrow %u from a file.", (unsigned)(MATLAB_HDR.SizeY-i-1)); */ goto ExitLoop;
}
@@ -598,8 +598,8 @@
if(!SyncImagePixels(image))
{
- //if (logging) (void)LogMagickEvent(CoderEvent,GetMagickModule(),
- // " MAT failed to sync image pixels for a row %u", \
(unsigned)(MATLAB_HDR.SizeY-i-1)); + /* if (logging) \
(void)LogMagickEvent(CoderEvent,GetMagickModule(), */ + /* " MAT failed \
to sync image pixels for a row %u", (unsigned)(MATLAB_HDR.SizeY-i-1)); */ goto \
ExitLoop; }
}
diff -r fe96878b901b -r 1d2d4e76704d coders/meta.c
--- a/coders/meta.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/meta.c Mon Aug 08 21:54:21 2016 -0500
@@ -884,11 +884,12 @@
return 0;
}
-static int jpeg_skip_variable2(Image *ifile, Image *ARGUNUSED(ofile))
+static int jpeg_skip_variable2(Image *ifile, Image *ofile)
{
unsigned int length;
int c1,c2;
+ ARG_NOT_USED(ofile);
if ((c1 = ReadBlobByte(ifile)) == EOF) return M_EOI;
if ((c2 = ReadBlobByte(ifile)) == EOF) return M_EOI;
diff -r fe96878b901b -r 1d2d4e76704d coders/msl.c
--- a/coders/msl.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/msl.c Mon Aug 08 21:54:21 2016 -0500
@@ -436,12 +436,14 @@
}
static void
-MSLSetDocumentLocator(void *ARGUNUSED(context),
- xmlSAXLocatorPtr ARGUNUSED(location))
+MSLSetDocumentLocator(void *context,
+ xmlSAXLocatorPtr location)
{
/* MSLInfo */
/* *msl_info; */
+ ARG_NOT_USED(context);
+ ARG_NOT_USED(location);
/*
Receive the document locator at startup, actually xmlDefaultSAXLocator.
*/
@@ -476,11 +478,12 @@
}
static void
-MSLEndDocument(void *ARGUNUSED(context))
+MSLEndDocument(void *context)
{
/* MSLInfo */
/* *msl_info; */
+ ARG_NOT_USED(context);
/*
Called when the document end has been detected.
*/
@@ -4256,11 +4259,12 @@
}
static void
-MSLCharacters(void *ARGUNUSED(context),const xmlChar *c,int length)
+MSLCharacters(void *context,const xmlChar *c,int length)
{
/* MSLInfo */
/* *msl_info; */
+ ARG_NOT_USED(context);
/*
Receiving some characters from the parser.
*/
@@ -4292,11 +4296,12 @@
}
static void
-MSLIgnorableWhitespace(void *ARGUNUSED(context),const xmlChar *c,int length)
+MSLIgnorableWhitespace(void *context,const xmlChar *c,int length)
{
/* MSLInfo */
/* *msl_info; */
+ ARG_NOT_USED(context);
/*
Receiving some ignorable whitespaces from the parser.
*/
@@ -4306,12 +4311,13 @@
}
static void
-MSLProcessingInstructions(void *ARGUNUSED(context),const xmlChar *target,
+MSLProcessingInstructions(void *context,const xmlChar *target,
const xmlChar *data)
{
/* MSLInfo */
/* *msl_info; */
+ ARG_NOT_USED(context);
/*
A processing instruction has been parsed.
*/
@@ -4322,11 +4328,12 @@
}
static void
-MSLComment(void *ARGUNUSED(context),const xmlChar *value)
+MSLComment(void *context,const xmlChar *value)
{
/* MSLInfo */
/* *msl_info; */
+ ARG_NOT_USED(context);
/*
A comment has been parsed.
*/
diff -r fe96878b901b -r 1d2d4e76704d coders/pcd.c
--- a/coders/pcd.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/pcd.c Mon Aug 08 21:54:21 2016 -0500
@@ -960,7 +960,7 @@
%
*/
-static unsigned int WritePCDTile(const ImageInfo *ARGUNUSED(image_info),
+static unsigned int WritePCDTile(const ImageInfo *image_info,
Image *image,char *page_geometry,char *tile_geometry)
{
Image
@@ -981,6 +981,8 @@
i,
x;
+ ARG_NOT_USED(image_info);
+
/*
Scale image to tile size.
*/
diff -r fe96878b901b -r 1d2d4e76704d coders/pnm.c
--- a/coders/pnm.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/pnm.c Mon Aug 08 21:54:21 2016 -0500
@@ -1553,7 +1553,7 @@
i=0;
j=0;
- value=(depth <=8 ? 255 : depth <= 16 ? 65535 : 4294967295);
+ value=(depth <=8 ? 255U : depth <= 16 ? 65535U : 4294967295U);
j += sprintf(&buffer[j],"%u\n",value);
for (y=0; y < image->rows; y++)
@@ -1643,7 +1643,7 @@
i=0;
j=0;
- value=(depth <=8 ? 255 : (depth <= 16 ? 65535 : 4294967295));
+ value=(depth <=8 ? 255U : (depth <= 16 ? 65535U : 4294967295U));
j += sprintf(&buffer[j],"%u\n",value);
for (y=0; y < image->rows; y++)
diff -r fe96878b901b -r 1d2d4e76704d coders/ps3.c
--- a/coders/ps3.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/ps3.c Mon Aug 08 21:54:21 2016 -0500
@@ -749,9 +749,10 @@
*image;
} WriteByteHookInfo;
-static unsigned int MaskWriteByteHook(Image *ARGUNUSED(mask_image),
+static unsigned int MaskWriteByteHook(Image *mask_image,
const magick_uint8_t code, void *info)
{
+ ARG_NOT_USED(mask_image);
Ascii85Encode(((WriteByteHookInfo *)info)->image, (unsigned long)code);
return(True);
}
diff -r fe96878b901b -r 1d2d4e76704d coders/svg.c
--- a/coders/svg.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/svg.c Mon Aug 08 21:54:21 2016 -0500
@@ -629,12 +629,14 @@
}
-static void SVGSetDocumentLocator(void *ARGUNUSED(context),
- xmlSAXLocatorPtr ARGUNUSED(location))
+static void SVGSetDocumentLocator(void *context,
+ xmlSAXLocatorPtr location)
{
/* SVGInfo */
/* *svg_info; */
+ ARG_NOT_USED(context);
+ ARG_NOT_USED(location);
/*
Receive the document locator at startup, actually xmlDefaultSAXLocator.
*/
@@ -2518,11 +2520,12 @@
(void) xmlAddChild(parser->node,xmlNewReference(svg_info->document,name));
}
-static void SVGIgnorableWhitespace(void *ARGUNUSED(context),const xmlChar *c,int \
length) +static void SVGIgnorableWhitespace(void *context,const xmlChar *c,int \
length) {
/* SVGInfo */
/* *svg_info; */
+ ARG_NOT_USED(context);
/*
Receiving some ignorable whitespaces from the parser.
*/
@@ -2531,12 +2534,13 @@
/* svg_info=(SVGInfo *) context; */
}
-static void SVGProcessingInstructions(void *ARGUNUSED(context),const xmlChar \
*target, +static void SVGProcessingInstructions(void *context,const xmlChar *target,
const xmlChar *data)
{
/* SVGInfo */
/* *svg_info; */
+ ARG_NOT_USED(context);
/*
A processing instruction has been parsed.
*/
diff -r fe96878b901b -r 1d2d4e76704d coders/tiff.c
--- a/coders/tiff.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/tiff.c Mon Aug 08 21:54:21 2016 -0500
@@ -893,9 +893,9 @@
/* Unmap BLOB memory */
static void
-TIFFUnmapBlob(thandle_t ARGUNUSED(image),
- tdata_t ARGUNUSED(base),
- toff_t ARGUNUSED(size))
+TIFFUnmapBlob(thandle_t image,
+ tdata_t base,
+ toff_t size)
{
#if LOG_TIFF_BLOB_IO
Image
@@ -905,6 +905,10 @@
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"TIFF unmap blob: base=0x%p size=%" MAGICK_OFF_F "d",
base,(magick_off_t) size);
+#else
+ ARG_NOT_USED(image);
+ ARG_NOT_USED(base);
+ ARG_NOT_USED(size);
#endif /* LOG_TIFF_BLOB_IO */
}
diff -r fe96878b901b -r 1d2d4e76704d coders/wmf.c
--- a/coders/wmf.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/wmf.c Mon Aug 08 21:54:21 2016 -0500
@@ -575,8 +575,9 @@
}
}
-static void ipa_bmp_free(wmfAPI * ARGUNUSED(API), wmfBMP * bmp)
+static void ipa_bmp_free(wmfAPI * API, wmfBMP * bmp)
{
+ ARG_NOT_USED(API);
DestroyImageList((Image*)bmp->data);
bmp->data = (void*) 0;
bmp->width = (U16) 0;
@@ -1481,26 +1482,34 @@
}
-static void ipa_udata_init(wmfAPI * ARGUNUSED(API), wmfUserData_t * \
ARGUNUSED(userdata)) +static void ipa_udata_init(wmfAPI *API, wmfUserData_t \
*userdata) {
+ ARG_NOT_USED(API);
+ ARG_NOT_USED(userdata);
/* wmf_magick_t* ddata = WMF_MAGICK_GetData (API); */
}
-static void ipa_udata_copy(wmfAPI * ARGUNUSED(API), wmfUserData_t * \
ARGUNUSED(userdata)) +static void ipa_udata_copy(wmfAPI *API, wmfUserData_t \
*userdata) {
+ ARG_NOT_USED(API);
+ ARG_NOT_USED(userdata);
/* wmf_magick_t* ddata = WMF_MAGICK_GetData (API); */
}
-static void ipa_udata_set(wmfAPI * ARGUNUSED(API), wmfUserData_t * \
ARGUNUSED(userdata)) +static void ipa_udata_set(wmfAPI *API, wmfUserData_t *userdata)
{
+ ARG_NOT_USED(API);
+ ARG_NOT_USED(userdata);
/* wmf_magick_t* ddata = WMF_MAGICK_GetData (API); */
}
-static void ipa_udata_free(wmfAPI * ARGUNUSED(API), wmfUserData_t * \
ARGUNUSED(userdata)) +static void ipa_udata_free(wmfAPI *API, wmfUserData_t \
*userdata) {
+ ARG_NOT_USED(API);
+ ARG_NOT_USED(userdata);
/* wmf_magick_t* ddata = WMF_MAGICK_GetData (API); */
}
@@ -2291,11 +2300,12 @@
}
/* Initialize API font structures */
-static void lite_font_init( wmfAPI* API, wmfAPI_Options* ARGUNUSED(options))
+static void lite_font_init( wmfAPI* API, wmfAPI_Options* options)
{
wmfFontData
*font_data;
+ ARG_NOT_USED(options);
API->fonts = 0;
/* Allocate wmfFontData data structure */
diff -r fe96878b901b -r 1d2d4e76704d coders/wpg.c
--- a/coders/wpg.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/wpg.c Mon Aug 08 21:54:21 2016 -0500
@@ -321,7 +321,7 @@
*q++=image->colormap[index];
}
}
- //p++;
+ /* p++; */
}
RetVal = MagickPass;
break;
diff -r fe96878b901b -r 1d2d4e76704d coders/x.c
--- a/coders/x.c Mon Aug 08 08:39:31 2016 -0500
+++ b/coders/x.c Mon Aug 08 21:54:21 2016 -0500
@@ -74,11 +74,12 @@
%
*/
static Image *ReadXImage(const ImageInfo *image_info,
- ExceptionInfo *ARGUNUSED(exception))
+ ExceptionInfo *exception)
{
MagickXImportInfo
ximage_info;
+ ARG_NOT_USED(exception);
MagickXGetImportInfo(&ximage_info);
return(MagickXImportImage(image_info,&ximage_info));
}
diff -r fe96878b901b -r 1d2d4e76704d filters/analyze.c
--- a/filters/analyze.c Mon Aug 08 08:39:31 2016 -0500
+++ b/filters/analyze.c Mon Aug 08 21:54:21 2016 -0500
@@ -58,7 +58,7 @@
*/
#define PRECISION "%.0f"
ModuleExport unsigned int AnalyzeImage(Image **image,
- const int ARGUNUSED(argc),char **ARGUNUSED(argv))
+ const int argc,char **argv)
{
double
bsumX = 0.0,
@@ -88,6 +88,9 @@
char
text[MaxTextExtent];
+ ARG_NOT_USED(argc);
+ ARG_NOT_USED(argv);
+
assert(image != (Image **) NULL);
assert(*image != (Image *) NULL);
for (y=0; y < (int) (*image)->rows; y++)
diff -r fe96878b901b -r 1d2d4e76704d magick/annotate.c
--- a/magick/annotate.c Mon Aug 08 08:39:31 2016 -0500
+++ b/magick/annotate.c Mon Aug 08 21:54:21 2016 -0500
@@ -1436,11 +1436,14 @@
}
#else
static unsigned int RenderFreetype(Image *image,const DrawInfo *draw_info,
- const char * ARGUNUSED(encoding),const PointInfo * ARGUNUSED(offset),
- TypeMetric * ARGUNUSED(metrics))
+ const char *encoding,const PointInfo *offset,
+ TypeMetric *metrics)
{
ThrowBinaryException(MissingDelegateError,FreeTypeLibraryIsNotAvailable,
- draw_info->font)
+ draw_info->font);
+ ARG_NOT_USED(encoding);
+ ARG_NOT_USED(offset);
+ ARG_NOT_USED(metrics);
}
#endif
diff -r fe96878b901b -r 1d2d4e76704d magick/attribute.c
--- a/magick/attribute.c Mon Aug 08 08:39:31 2016 -0500
+++ b/magick/attribute.c Mon Aug 08 21:54:21 2016 -0500
@@ -438,8 +438,8 @@
*/
static char *
TracePSClippingPath(unsigned char *blob,size_t length,
- unsigned long ARGUNUSED(columns),
- unsigned long ARGUNUSED(rows))
+ unsigned long columns,
+ unsigned long rows)
{
char
*path,
@@ -464,6 +464,9 @@
unsigned int
in_subpath;
+ ARG_NOT_USED(columns);
+ ARG_NOT_USED(rows);
+
first[0].x=first[0].y=first[1].x=first[1].y=0;
last[1].x=last[1].y=last[2].x=last[2].y=0;
path=AllocateString((char *) NULL);
diff -r fe96878b901b -r 1d2d4e76704d magick/command.c
--- a/magick/command.c Mon Aug 08 08:39:31 2016 -0500
+++ b/magick/command.c Mon Aug 08 21:54:21 2016 -0500
@@ -8181,10 +8181,13 @@
%
%
*/
-static unsigned int HelpCommand(ImageInfo *ARGUNUSED(image_info),
- int argc,char **argv,char **ARGUNUSED(metadata),
- ExceptionInfo *ARGUNUSED(exception))
-{
+static unsigned int HelpCommand(ImageInfo *image_info,
+ int argc,char **argv,char **metadata,
+ ExceptionInfo *exception)
+{
+ ARG_NOT_USED(image_info);
+ ARG_NOT_USED(metadata);
+ ARG_NOT_USED(exception);
if (argc > 1)
{
int
@@ -16864,9 +16867,9 @@
{
PrintFeatureTextual(feature,support, NULL);
}
-static unsigned int VersionCommand(ImageInfo *ARGUNUSED(image_info),
- int ARGUNUSED(argc),char **ARGUNUSED(argv),char **ARGUNUSED(metadata),
- ExceptionInfo *ARGUNUSED(exception))
+static unsigned int VersionCommand(ImageInfo *image_info,
+ int argc,char **argv,char **metadata,
+ ExceptionInfo *exception)
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Graphicsmagick-commit mailing list
Graphicsmagick-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic