From e850bf67cce1053499b13d46071f355e0814d949 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sun, 15 Feb 2004 01:58:24 +0000 Subject: [PATCH] fixed a bunch of warnings. reverted last commit. SVN revision: 8972 --- src/api.c | 14 +++----------- src/blend.h | 3 +++ src/colormod.c | 1 - src/filter.h | 3 +++ src/font.h | 4 ---- src/image.c | 3 --- src/rend.c | 2 +- src/rgbadraw.c | 12 +++++++----- src/rgbadraw.h | 7 +++++-- 9 files changed, 22 insertions(+), 27 deletions(-) diff --git a/src/api.c b/src/api.c index 5428c83..257dcdc 100644 --- a/src/api.c +++ b/src/api.c @@ -560,8 +560,7 @@ void imlib_context_get_color_hsva(float *hue, float *saturation, float *value, int *alpha) { - int r, g, b, f; - float i, j, k, max, min, d; + int r, g, b; imlib_context_get_color(&r, &g, &b, alpha); __imlib_rgb_to_hsv(r, g, b, hue, saturation, value); @@ -1050,10 +1049,7 @@ imlib_image_set_border(Imlib_Border * border) im->border.right = border->right; im->border.top = border->top; im->border.bottom = border->bottom; - -#ifndef X_DISPLAY_MISSING __imlib_DirtyPixmapsForImage(im); -#endif } void @@ -2114,8 +2110,6 @@ imlib_text_draw_with_return_metrics(int x, int y, const char *text, { ImlibImage *im; ImlibFont *fn; - char *tt; - int tx, ty; int dir; if (!ctx) @@ -3087,8 +3081,7 @@ imlib_image_query_pixel_hsva(int x, int y, float *hue, float *saturation, { ImlibImage *im; DATA32 *p; - int r, g, b, f; - float i, j, k, max, min, d; + int r, g, b; if (!ctx) ctx = imlib_context_new(); @@ -3121,8 +3114,7 @@ imlib_image_query_pixel_hlsa(int x, int y, float *hue, float *lightness, { ImlibImage *im; DATA32 *p; - int r, g, b, f; - float i, j, k, max, min, d; + int r, g, b; if (!ctx) ctx = imlib_context_new(); diff --git a/src/blend.h b/src/blend.h index eff3581..e8c01c1 100644 --- a/src/blend.h +++ b/src/blend.h @@ -389,6 +389,9 @@ __imlib_BlendRGBAToData(DATA32 *src, int src_w, int src_h, DATA32 *dst, int dst_w, int dst_h, int sx, int sy, int dx, int dy, int w, int h, char blend, char merge_alpha, ImlibColorModifier *cm, ImlibOp op, char rgb_src); +void +__imlib_build_pow_lut(void); + #ifdef DO_MMX_ASM void __imlib_mmx_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst, diff --git a/src/colormod.c b/src/colormod.c index aa6fe75..7940989 100644 --- a/src/colormod.c +++ b/src/colormod.c @@ -80,7 +80,6 @@ __imlib_DataCmodApply(DATA32 * data, int w, int h, int jump, { int x, y; DATA32 *p; - DATA8 r, g, b, a; /* We might be adding alpha */ if (fl && !(*fl & F_HAS_ALPHA)) diff --git a/src/filter.h b/src/filter.h index 652dc76..0c504b0 100644 --- a/src/filter.h +++ b/src/filter.h @@ -31,6 +31,9 @@ void __imlib_FilterSet(ImlibFilterColor *fil, int x, int y, int a, int r, int g, int b); void +__imlib_FilterSetColor(ImlibFilterColor * fil, int x, int y, + int a, int r, int g, int b); +void __imlib_FilterDivisors(ImlibFilter *fil, int a, int r, int g, int b); void __imlib_FilterConstants(ImlibFilter *fil, int a, int r, int g, int b); diff --git a/src/font.h b/src/font.h index c92bbaf..526acb3 100644 --- a/src/font.h +++ b/src/font.h @@ -76,13 +76,9 @@ char **imlib_font_list_fonts(int *num_ret); ImlibFont *imlib_font_load_joined(const char *name); ImlibFont *imlib_font_load(const char *name, int size); void imlib_font_free(ImlibFont * fn); -static int font_modify_cache_cb(Imlib_Hash * hash, const char *key, - void *data, void *fdata); int imlib_font_cache_get(void); void imlib_font_cache_set(int size); void imlib_font_flush(void); -static int font_flush_free_glyph_cb(Imlib_Hash * hash, const char *key, - void *data, void *fdata); void imlib_font_modify_cache_by(ImlibFont * fn, int dir); void imlib_font_modify_cache_by(ImlibFont * fn, int dir); void imlib_font_flush_last(void); diff --git a/src/image.c b/src/image.c index 1d1871a..237a474 100644 --- a/src/image.c +++ b/src/image.c @@ -1267,11 +1267,8 @@ void __imlib_DirtyImage(ImlibImage * im) { SET_FLAG(im->flags, F_INVALID); - -#ifndef X_DISPLAY_MISSING /* and dirty all pixmaps generated from it */ __imlib_DirtyPixmapsForImage(im); -#endif } void diff --git a/src/rend.c b/src/rend.c index f9f89fd..8159d46 100644 --- a/src/rend.c +++ b/src/rend.c @@ -75,7 +75,7 @@ __imlib_RenderGetPixel(Display * d, Drawable w, Visual * v, Colormap cm, else { unsigned int rm, gm, bm; - int i, rshift, gshift, bshift; + int i, rshift = 0, gshift = 0, bshift = 0; DATA32 val; rm = v->red_mask; diff --git a/src/rgbadraw.c b/src/rgbadraw.c index 26d58b2..c888c8d 100644 --- a/src/rgbadraw.c +++ b/src/rgbadraw.c @@ -6,6 +6,7 @@ #include "blend.h" #include "updates.h" #include "rgbadraw.h" +#include "Imlib2.h" #define round(a) floor(a+0.5) @@ -446,7 +447,7 @@ __imlib_draw_line(ImlibImage * im, int x1, int y1, int x2, int y2, DATA8 r, { int x, y, dx, dy, yy, xx, am, tmp; DATA32 *p; - DATA8 aaa, nr, ng, nb, rr, gg, bb, aa, na; + DATA8 aaa; /* clip to top edge */ if ((y1 < 0) && (y2 < 0)) @@ -1263,7 +1264,6 @@ __imlib_draw_filled_box_clipped(ImlibImage * im, int x, int y, int w, int h, { int yy, xx, tmp; DATA32 *p; - DATA8 nr, ng, nb, rr, gg, bb, aa, na; if (x < 0) { @@ -1369,7 +1369,6 @@ __imlib_draw_filled_box(ImlibImage * im, int x, int y, int w, int h, DATA8 r, { int yy, xx, tmp; DATA32 *p; - DATA8 nr, ng, nb, rr, gg, bb, aa, na; if (x < 0) { @@ -2053,6 +2052,8 @@ __imlib_draw_ellipse_clipped(ImlibImage * im, int xc, int yc, int aa, int bb, } } +#if 0 +/* unused */ static void edge(edgeRec * table, ImlibPoint * pt1, ImlibPoint * pt2) { @@ -2077,6 +2078,7 @@ edge(edgeRec * table, ImlibPoint * pt1, ImlibPoint * pt2) } while (iy1 <= iy2); } +#endif static void span(ImlibImage * im, int y, int x1, int x2, DATA8 r, DATA8 g, @@ -2357,14 +2359,14 @@ __imlib_draw_polygon_filled(ImlibImage * im, ImlibPoly poly, int clip_xmin, /* last span on line and still not < ss->x */ if (ps) ps->next = s; - nospans: + nospans: ; } } if (i == y2) goto nolines; i += step; } - nolines: + nolines: ; } for (i = 0; i < h; i++) { diff --git a/src/rgbadraw.h b/src/rgbadraw.h index 069a67b..05cf71e 100644 --- a/src/rgbadraw.h +++ b/src/rgbadraw.h @@ -146,8 +146,11 @@ void __imlib_draw_box(ImlibImage * im, int x, int y, int w, int h, DATA8 r, DATA8 g, DATA8 b, DATA8 a, ImlibOp op); void __imlib_draw_filled_box(ImlibImage * im, int x, int y, int w, int h, DATA8 r, DATA8 g, DATA8 b, DATA8 a, ImlibOp op); -void __imlib_draw_filled_box(ImlibImage * im, int x, int y, int w, int h, - DATA8 r, DATA8 g, DATA8 b, DATA8 a, ImlibOp op); +void __imlib_draw_filled_box_clipped(ImlibImage * im, int x, int y, int w, + int h, + int clip_xmin, int clip_xmax, int clip_ymin, + int clip_ymax, DATA8 r, DATA8 g, DATA8 b, + DATA8 a, ImlibOp op); void __imlib_copy_image_data(ImlibImage * im, int x, int y, int w, int h, int nx, int ny); void __imlib_copy_alpha_data(ImlibImage * src, ImlibImage * dst, int x, int y,