diff options
author | Sebastian Rasmussen <sebras@hotmail.com> | 2008-03-08 18:21:14 +0100 |
---|---|---|
committer | Sebastian Rasmussen <sebras@hotmail.com> | 2008-03-08 18:21:14 +0100 |
commit | 5653ed4d9e7d413192a8923d29eb05c752d0b1ac (patch) | |
tree | 54d88cfcf3852f404ff532c3084de6d1d4f858f9 /raster | |
parent | e921e12bcfa3a343eac5e4b7ba3f2566f5eff49f (diff) | |
download | mupdf-5653ed4d9e7d413192a8923d29eb05c752d0b1ac.tar.xz |
Fixed almost all compiler warnings.
Diffstat (limited to 'raster')
-rw-r--r-- | raster/glyphcache.c | 14 | ||||
-rw-r--r-- | raster/imagescale.c | 8 | ||||
-rw-r--r-- | raster/render.c | 2 |
3 files changed, 15 insertions, 9 deletions
diff --git a/raster/glyphcache.c b/raster/glyphcache.c index 41259878..b3f79173 100644 --- a/raster/glyphcache.c +++ b/raster/glyphcache.c @@ -164,6 +164,7 @@ didcoll ++; } } +/* static void hashremove(fz_glyphcache *arena, fz_key *key) { @@ -176,7 +177,7 @@ hashremove(fz_glyphcache *arena, fz_key *key) while (1) { if (!tab[pos].val) - return; /* boo hoo! tried to remove non-existant key */ + return; // boo hoo! tried to remove non-existant key if (memcmp(key, &tab[pos].key, sizeof (fz_key)) == 0) { @@ -213,6 +214,7 @@ hashremove(fz_glyphcache *arena, fz_key *key) pos = 0; } } +*/ void fz_debugglyphcache(fz_glyphcache *arena) @@ -267,6 +269,7 @@ bubble(fz_glyphcache *arena, int i) arena->lru[i].ent->val = &arena->lru[i]; } +/* static void evictlast(fz_glyphcache *arena) { @@ -282,22 +285,23 @@ evictlast(fz_glyphcache *arena) s = lru[k].samples; e = s + lru[k].w * lru[k].h; - /* pack buffer to fill hole */ + // pack buffer to fill hole memmove(s, e, arena->buffer + arena->used - e); memset(arena->buffer + arena->used - (e - s), 0, e - s); arena->used -= e - s; - /* update lru pointers */ - for (i = 0; i < k; i++) /* XXX this is DOG slow! XXX */ + // update lru pointers + for (i = 0; i < k; i++) // XXX this is DOG slow! XXX if (lru[i].samples >= e) lru[i].samples -= e - s; - /* remove hash entry */ + // remove hash entry key = lru[k].ent->key; hashremove(arena, &key); arena->load --; } +*/ static void evictall(fz_glyphcache *arena) diff --git a/raster/imagescale.c b/raster/imagescale.c index 96486033..3022189e 100644 --- a/raster/imagescale.c +++ b/raster/imagescale.c @@ -4,9 +4,9 @@ typedef unsigned char byte; -static inline void srown(byte * restrict src, byte * restrict dst, unsigned w, unsigned denom, unsigned n) +static inline void srown(byte * restrict src, byte * restrict dst, int w, int denom, int n) { - unsigned x, left, k; + int x, left, k; unsigned sum[FZ_MAXCOLORS]; left = 0; @@ -35,9 +35,9 @@ static inline void srown(byte * restrict src, byte * restrict dst, unsigned w, u dst[k] = sum[k] / left; } -static inline void srownp2(byte * restrict src, byte * restrict dst, unsigned w, unsigned log2denom, unsigned n) +static inline void srownp2(byte * restrict src, byte * restrict dst, int w, int log2denom, int n) { - unsigned x, left, k; + int x, left, k; unsigned sum[FZ_MAXCOLORS]; left = 0; diff --git a/raster/render.c b/raster/render.c index 690ba227..badfec8b 100644 --- a/raster/render.c +++ b/raster/render.c @@ -792,6 +792,8 @@ rendernode(fz_renderer *gc, fz_node *node, fz_matrix ctm) return rendernode(gc, ((fz_linknode*)node)->tree->root, ctm); case FZ_NMETA: return rendernode(gc, node->first, ctm); + case FZ_NBLEND: + return nil; } return nil; |