fix -Wunused-parameter
parent
8287bb35ce
commit
3aaf1ab557
|
@ -2,7 +2,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <gd.h>
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
FILE * out;
|
||||
|
|
1
src/gd.c
1
src/gd.c
|
@ -1183,6 +1183,7 @@ BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
|
|||
BGD_DECLARE(void) gdImageAABlend (gdImagePtr im)
|
||||
{
|
||||
/* NO-OP, kept for library compatibility. */
|
||||
(void)im;
|
||||
}
|
||||
|
||||
static void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col);
|
||||
|
|
|
@ -794,10 +794,7 @@ void skip_input_data(j_decompress_ptr cinfo, long num_bytes)
|
|||
*/
|
||||
void term_source(j_decompress_ptr cinfo)
|
||||
{
|
||||
#if 0
|
||||
/* never used */
|
||||
my_src_ptr src = (my_src_ptr) cinfo->src;
|
||||
#endif
|
||||
(void)cinfo;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ gdPngWriteData (png_structp png_ptr, png_bytep data, png_size_t length)
|
|||
static void
|
||||
gdPngFlushData (png_structp png_ptr)
|
||||
{
|
||||
(void)png_ptr;
|
||||
}
|
||||
|
||||
BGD_DECLARE(gdImagePtr) gdImageCreateFromPng (FILE * inFile)
|
||||
|
|
|
@ -176,6 +176,7 @@ static toff_t tiff_seekproc(thandle_t clientdata, toff_t offset, int from)
|
|||
/* TIFFCloseProc tiff_closeproc - used to finally close the TIFF file */
|
||||
static int tiff_closeproc(thandle_t clientdata)
|
||||
{
|
||||
(void)clientdata;
|
||||
/*tiff_handle *th = (tiff_handle *)clientdata;
|
||||
gdIOCtx *ctx = th->ctx;
|
||||
|
||||
|
@ -194,13 +195,18 @@ static toff_t tiff_sizeproc(thandle_t clientdata)
|
|||
/* TIFFMapFileProc tiff_mapproc() */
|
||||
static int tiff_mapproc(thandle_t h, tdata_t *d, toff_t *o)
|
||||
{
|
||||
(void)h;
|
||||
(void)d;
|
||||
(void)o;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* TIFFUnmapFileProc tiff_unmapproc */
|
||||
static void tiff_unmapproc(thandle_t h, tdata_t d, toff_t o)
|
||||
{
|
||||
|
||||
(void)h;
|
||||
(void)d;
|
||||
(void)o;
|
||||
}
|
||||
|
||||
|
||||
|
@ -495,6 +501,10 @@ static void readTiffBw (const unsigned char *src,
|
|||
int src_x, src_y;
|
||||
int k;
|
||||
|
||||
(void)has_alpha;
|
||||
(void)extra;
|
||||
(void)align;
|
||||
|
||||
for (src_y = 0; src_y < height; ++src_y) {
|
||||
k = 0;
|
||||
while (k < width) {
|
||||
|
@ -533,6 +543,9 @@ static void readTiff8bit (const unsigned char *src,
|
|||
int red, green, blue, alpha;
|
||||
int x, y;
|
||||
|
||||
(void)extra;
|
||||
(void)align;
|
||||
|
||||
switch (photometric) {
|
||||
case PHOTOMETRIC_PALETTE:
|
||||
/* Palette has no alpha (see TIFF specs for more details */
|
||||
|
|
|
@ -359,6 +359,8 @@ prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
|||
#else
|
||||
int width = oim->sx;
|
||||
int num_rows = oim->sy;
|
||||
|
||||
(void)nim;
|
||||
#endif
|
||||
|
||||
for (row = 0; row < num_rows; row++)
|
||||
|
@ -479,6 +481,10 @@ LOCAL (void)
|
|||
int c0min, c0max, c1min, c1max, c2min, c2max;
|
||||
INT32 dist0, dist1, dist2;
|
||||
long ccount;
|
||||
#ifndef ORIGINAL_LIB_JPEG
|
||||
(void)oim;
|
||||
(void)nim;
|
||||
#endif
|
||||
|
||||
c0min = boxp->c0min;
|
||||
c0max = boxp->c0max;
|
||||
|
@ -727,6 +733,9 @@ LOCAL (void)
|
|||
long c0total = 0;
|
||||
long c1total = 0;
|
||||
long c2total = 0;
|
||||
#ifndef ORIGINAL_LIB_JPEG
|
||||
(void)oim;
|
||||
#endif
|
||||
|
||||
c0min = boxp->c0min;
|
||||
c0max = boxp->c0max;
|
||||
|
@ -954,6 +963,10 @@ find_nearby_colors (
|
|||
int i, x, ncolors;
|
||||
INT32 minmaxdist, min_dist, max_dist, tdist;
|
||||
INT32 mindist[MAXNUMCOLORS]; /* min distance to colormap entry i */
|
||||
#ifndef ORIGINAL_LIB_JPEG
|
||||
(void)oim;
|
||||
(void)cquantize;
|
||||
#endif
|
||||
|
||||
/* Compute true coordinates of update box's upper corner and center.
|
||||
* Actually we compute the coordinates of the center of the upper-corner
|
||||
|
@ -1130,6 +1143,10 @@ LOCAL (void) find_best_colors (
|
|||
INT32 inc0, inc1, inc2; /* initial values for increments */
|
||||
/* This array holds the distance to the nearest-so-far color for each cell */
|
||||
INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];
|
||||
#ifndef ORIGINAL_LIB_JPEG
|
||||
(void)oim;
|
||||
(void)cquantize;
|
||||
#endif
|
||||
|
||||
/* Initialize best-distance for each cell of the update box */
|
||||
bptr = bestdist;
|
||||
|
@ -1607,6 +1624,9 @@ init_error_limit (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize)
|
|||
table = (int *) (*cinfo->mem->alloc_small)
|
||||
((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE * 2 + 1) * SIZEOF (int));
|
||||
#else
|
||||
(void)oim;
|
||||
(void)nim;
|
||||
|
||||
cquantize->error_limiter_storage =
|
||||
(int *) gdMalloc ((MAXJSAMPLE * 2 + 1) * sizeof (int));
|
||||
if (!cquantize->error_limiter_storage)
|
||||
|
|
|
@ -559,6 +559,8 @@ tweenColorFetch (char **error, void *key)
|
|||
int pixel, npixel, bg, fg;
|
||||
gdImagePtr im;
|
||||
|
||||
(void)error;
|
||||
|
||||
a = (tweencolor_t *) gdMalloc (sizeof (tweencolor_t));
|
||||
if (!a) {
|
||||
return NULL;
|
||||
|
|
|
@ -33,6 +33,8 @@ int iconv_close (iconv_t);
|
|||
iconv_t
|
||||
iconv_open (const char *tocode, const char *fromcode)
|
||||
{
|
||||
(void)tocode;
|
||||
(void)fromcode;
|
||||
return (iconv_t) (-1);
|
||||
}
|
||||
|
||||
|
@ -40,12 +42,18 @@ size_t
|
|||
iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
|
||||
char **outbuf, size_t * outbytesleft)
|
||||
{
|
||||
(void)cd;
|
||||
(void)inbuf;
|
||||
(void)inbytesleft;
|
||||
(void)outbuf;
|
||||
(void)outbytesleft;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
iconv_close (iconv_t cd)
|
||||
{
|
||||
(void)cd;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -97,6 +105,8 @@ debug (const char *format, ...)
|
|||
vfprintf (stdout, format, args);
|
||||
fprintf (stdout, "\n");
|
||||
va_end (args);
|
||||
#else
|
||||
(void)format;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#ifndef HAVE_LIBXPM
|
||||
BGD_DECLARE(gdImagePtr) gdImageCreateFromXpm(char *filename)
|
||||
{
|
||||
(void)filename;
|
||||
fprintf(stderr, "libgd was not built with xpm support\n");
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -112,6 +112,8 @@ int gdTestImageCompareToImage(const char* file, int line, const char* message,
|
|||
gdImagePtr surface_diff = NULL;
|
||||
CuTestImageResult result = {0, 0};
|
||||
|
||||
(void)message;
|
||||
|
||||
if (!actual) {
|
||||
fprintf(stderr, "Image is NULL\n");
|
||||
goto fail;
|
||||
|
@ -210,6 +212,9 @@ int _gdTestErrorMsg(const char* file, int line, const char* format, ...) /* {{{
|
|||
va_list args;
|
||||
char *debug;
|
||||
|
||||
(void)file;
|
||||
(void)line;
|
||||
|
||||
va_start (args, format);
|
||||
vsnprintf (output_buf, sizeof (output_buf), format, args);
|
||||
va_end (args);
|
||||
|
|
|
@ -13,12 +13,15 @@ static gdImagePtr im;
|
|||
static void
|
||||
failPutC(gdIOCtxPtr ctx, int c)
|
||||
{
|
||||
(void)c;
|
||||
TERMINATE(ctx, 1);
|
||||
}
|
||||
|
||||
static int
|
||||
failPutBuf(gdIOCtxPtr ctx, const void * data, int size)
|
||||
{
|
||||
(void)data;
|
||||
(void)size;
|
||||
TERMINATE(ctx, 1);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "gdtest.h"
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
main(void)
|
||||
{
|
||||
gdImagePtr im;
|
||||
char path[1024];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "gdtest.h"
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
main(void)
|
||||
{
|
||||
gdImagePtr im;
|
||||
char path[1024];
|
||||
|
|
Loading…
Reference in New Issue