summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/x11_main.c6
-rw-r--r--fitz/base_hash.c16
-rw-r--r--fitz/filt_jbig2d.c4
-rw-r--r--mupdf/pdf_font.c4
-rw-r--r--mupdf/pdf_interpret.c2
-rw-r--r--mupdf/pdf_repair.c3
6 files changed, 15 insertions, 20 deletions
diff --git a/apps/x11_main.c b/apps/x11_main.c
index 4692f16b..5dd9efb5 100644
--- a/apps/x11_main.c
+++ b/apps/x11_main.c
@@ -694,11 +694,11 @@ int main(int argc, char **argv)
if (gapp.isediting)
{
- char buf[sizeof(gapp.search) + 50];
- sprintf(buf, "Search: %s", gapp.search);
+ char str[sizeof(gapp.search) + 50];
+ sprintf(str, "Search: %s", gapp.search);
XSetForeground(xdpy, xgc, WhitePixel(xdpy, xscr));
fillrect(0, 0, gapp.winw, 30);
- windrawstring(&gapp, 10, 20, buf);
+ windrawstring(&gapp, 10, 20, str);
}
if (!wasshowingpage && isshowingpage)
diff --git a/fitz/base_hash.c b/fitz/base_hash.c
index 9f96b75d..a1c46a7d 100644
--- a/fitz/base_hash.c
+++ b/fitz/base_hash.c
@@ -30,18 +30,18 @@ struct fz_hashtable_s
static unsigned hash(unsigned char *s, int len)
{
- unsigned hash = 0;
+ unsigned val = 0;
int i;
for (i = 0; i < len; i++)
{
- hash += s[i];
- hash += (hash << 10);
- hash ^= (hash >> 6);
+ val += s[i];
+ val += (val << 10);
+ val ^= (val >> 6);
}
- hash += (hash << 3);
- hash ^= (hash >> 11);
- hash += (hash << 15);
- return hash;
+ val += (val << 3);
+ val ^= (val >> 11);
+ val += (val << 15);
+ return val;
}
fz_hashtable *
diff --git a/fitz/filt_jbig2d.c b/fitz/filt_jbig2d.c
index 100eba05..122d41ce 100644
--- a/fitz/filt_jbig2d.c
+++ b/fitz/filt_jbig2d.c
@@ -99,10 +99,10 @@ fz_processjbig2d(fz_filter *filter, fz_buffer *in, fz_buffer *out)
/* XXX memcpy(out->wp, d->page->data + d->idx, len); */
{
- unsigned char * restrict in = &d->page->data[d->idx];
+ unsigned char * restrict p = &d->page->data[d->idx];
unsigned char * restrict o = out->wp;
for (i = 0; i < len; i++)
- *o++ = 0xff ^ *in++;
+ *o++ = 0xff ^ *p++;
}
out->wp += len;
diff --git a/mupdf/pdf_font.c b/mupdf/pdf_font.c
index fad8464b..28a08005 100644
--- a/mupdf/pdf_font.c
+++ b/mupdf/pdf_font.c
@@ -720,7 +720,6 @@ loadcidfont(pdf_fontdesc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *enco
if (widths)
{
int c0, c1, w;
- fz_obj *obj;
for (i = 0; i < fz_arraylen(widths); )
{
@@ -753,7 +752,6 @@ loadcidfont(pdf_fontdesc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *enco
if (pdf_getwmode(fontdesc->encoding) == 1)
{
- fz_obj *obj;
int dw2y = 880;
int dw2w = -1000;
@@ -769,7 +767,7 @@ loadcidfont(pdf_fontdesc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *enco
widths = fz_dictgets(dict, "W2");
if (widths)
{
- int c0, c1, w, x, y, k;
+ int c0, c1, w, x, y;
for (i = 0; i < fz_arraylen(widths); )
{
diff --git a/mupdf/pdf_interpret.c b/mupdf/pdf_interpret.c
index d03129e9..53ba2ee7 100644
--- a/mupdf/pdf_interpret.c
+++ b/mupdf/pdf_interpret.c
@@ -1046,7 +1046,6 @@ Lsetcolor:
{
case 0:
{
- int i;
fz_obj *array;
if (csi->top < 2)
goto syntaxerror;
@@ -1475,7 +1474,6 @@ pdf_runcsifile(pdf_csi *csi, fz_obj *rdb, fz_stream *file, char *buf, int buflen
case PDF_TKEYWORD:
if (!strcmp(buf, "BI"))
{
- fz_obj *obj;
int ch;
error = pdf_parsedict(&obj, csi->xref, file, buf, buflen);
diff --git a/mupdf/pdf_repair.c b/mupdf/pdf_repair.c
index d7451c27..d960c43e 100644
--- a/mupdf/pdf_repair.c
+++ b/mupdf/pdf_repair.c
@@ -134,6 +134,7 @@ pdf_repairxref(pdf_xref *xref, char *buf, int bufsize)
{
fz_error error;
fz_obj *dict, *obj;
+ fz_obj *length;
fz_obj *encrypt = nil;
fz_obj *id = nil;
@@ -311,8 +312,6 @@ pdf_repairxref(pdf_xref *xref, char *buf, int bufsize)
/* corrected stream length */
if (list[i].stmlen >= 0)
{
- fz_obj *dict, *length;
-
pdf_logxref("correct stream length %d %d = %d\n",
list[i].num, list[i].gen, list[i].stmlen);