#include <libart_lgpl/art_rgb.h>
#include "art_rgba_svp.h"
+#include "unused.h"
static void art_rgba_fill_run (art_u8 * linebuf, art_u8 r, art_u8 g, art_u8 b, int n);
static void art_rgba_run_alpha (art_u8 * linebuf, art_u8 r, art_u8 g, art_u8 b, int alpha, int n);
};
static void
-art_rgba_svp_alpha_callback (void *callback_data, int y,
+art_rgba_svp_alpha_callback (void *callback_data, int UNUSED(y),
int start, ArtSVPRenderAAStep *steps, int n_steps)
{
ArtRgbaSVPAlphaData *data = callback_data;
}
static void
-art_rgba_svp_alpha_opaque_callback (void *callback_data, int y,
+art_rgba_svp_alpha_opaque_callback (void *callback_data, int UNUSED(y),
int start,
ArtSVPRenderAAStep *steps, int n_steps)
{
int libart_x0, int libart_y0, int libart_x1, int libart_y1,
art_u32 rgba,
art_u8 *buf, int rowstride,
- ArtAlphaGamma *alphagamma)
+ ArtAlphaGamma UNUSED(*alphagamma))
{
ArtRgbaSVPAlphaData data;
int r, g, b, alpha;
#include <string.h>
#endif
+#include "unused.h"
+
#if 0
# define DEBUG 1
# define DLOG(x) fprintf x
}
/* measure width of a text string */
-double afm_get_text_width ( double start, const char* font, double size,
- double tabwidth, const char* text)
+double afm_get_text_width ( double UNUSED(start), const char* font, double size,
+ double UNUSED(tabwidth), const char* text)
{
const afm_fontinfo *fontinfo = afm_findfont(font);
long width = 0;
#include "rrd_gfx.h"
#include "rrd_afm.h"
+#include "unused.h"
/* lines are better drawn on the pixle than between pixles */
#define LINEOFFSET 0.5
}
double gfx_get_text_width_libart (
- gfx_canvas_t *canvas, double start, char* font, double size,
+ gfx_canvas_t *canvas, double UNUSED(start), char* font, double size,
double tabwidth, char* text, int rotation ){
int error;
int gfx_render_pdf (gfx_canvas_t *canvas,
art_u32 width, art_u32 height,
- gfx_color_t background, FILE *fp){
+ gfx_color_t UNUSED(background), FILE *fp){
struct pdf_state state;
memset(&state, 0, sizeof(pdf_state));
state.fp = fp;
#include "rrd_rpncalc.h"
#include "rrd_is_thread_safe.h"
+#include "unused.h"
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
/*
#ifdef HAVE_MMAP
info_t *write_RRA_row (rrd_t *rrd, unsigned long rra_idx,
unsigned long *rra_current,
- unsigned short CDP_scratch_idx, FILE *rrd_file,
+ unsigned short CDP_scratch_idx,
+#ifndef DEBUG
+FILE UNUSED(*rrd_file),
+#else
+FILE *rrd_file,
+#endif
info_t *pcdp_summary, time_t *rra_time, void *rrd_mmaped_file);
#else
info_t *write_RRA_row (rrd_t *rrd, unsigned long rra_idx,
#ifdef HAVE_MMAP
info_t
*write_RRA_row (rrd_t *rrd, unsigned long rra_idx, unsigned long *rra_current,
- unsigned short CDP_scratch_idx, FILE *rrd_file,
+ unsigned short CDP_scratch_idx,
+#ifndef DEBUG
+FILE UNUSED(*rrd_file),
+#else
+FILE *rrd_file,
+#endif
info_t *pcdp_summary, time_t *rra_time, void *rrd_mmaped_file)
#else
info_t
#include "rrd_tool.h"
#include "rrd_graph.h"
#include "rrd_xport.h"
+#include "unused.h"
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include <io.h>
int
-rrd_xport(int argc, char **argv, int *xsize,
+rrd_xport(int argc, char **argv, int UNUSED(*xsize),
time_t *start,
time_t *end, /* which time frame do you want ?
* will be changed to represent reality */
--- /dev/null
+/* define a macro to wrap variables in that would
+ otherwhise generate UNUSED variable warnings */
+
+#ifdef UNUSED
+#elif defined(__GNUC__)
+# define UNUSED(x) x __attribute__((unused))
+#elif defined(__LCLINT__)
+# define UNUSED(x) /*@unused@*/ x
+#else
+# define UNUSED(x) x
+#endif