summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2012-05-03 17:43:21 +0000
committerSimon Tatham <anakin@pobox.com>2012-05-03 17:43:21 +0000
commit689093cc870e60ab82a176c33613fa0aeaa0bf69 (patch)
tree0ae533c4c553d0cd50759686363c211104c66910
parentca37980e070dcd96d27d299bd4426858ec37ceae (diff)
downloadhalibut-689093cc870e60ab82a176c33613fa0aeaa0bf69.zip
halibut-689093cc870e60ab82a176c33613fa0aeaa0bf69.tar.gz
halibut-689093cc870e60ab82a176c33613fa0aeaa0bf69.tar.bz2
halibut-689093cc870e60ab82a176c33613fa0aeaa0bf69.tar.xz
Remove a bunch of unused variables spotted by Ubuntu 12.04's gcc.
[originally from svn r9478]
-rw-r--r--bk_paper.c2
-rw-r--r--bk_pdf.c2
-rw-r--r--in_afm.c2
-rw-r--r--wcwidth.c5
4 files changed, 2 insertions, 9 deletions
diff --git a/bk_paper.c b/bk_paper.c
index 531600c..e70ecf7 100644
--- a/bk_paper.c
+++ b/bk_paper.c
@@ -1715,7 +1715,6 @@ static void wrap_paragraph(para_data *pdata, word *words,
for (p = wrapping; p; p = p->next) {
line_data *ldata;
- word *wd;
int len, wid, spaces;
ldata = snew(line_data);
@@ -1740,7 +1739,6 @@ static void wrap_paragraph(para_data *pdata, word *words,
spaces = 0;
len = paper_width_list(&ctx, ldata->first, ldata->end, &spaces);
wid = (p == wrapping ? w - i1 : w - i2);
- wd = ldata->first;
ldata->hshortfall = wid - len;
ldata->nspaces = spaces;
diff --git a/bk_pdf.c b/bk_pdf.c
index 525e7d9..6daebc6 100644
--- a/bk_pdf.c
+++ b/bk_pdf.c
@@ -50,7 +50,6 @@ void pdf_backend(paragraph *sourceform, keywordlist *keywords,
int font_index;
font_encoding *fe;
page_data *page;
- int pageno;
FILE *fp;
char *filename;
paragraph *p;
@@ -427,7 +426,6 @@ void pdf_backend(paragraph *sourceform, keywordlist *keywords,
/*
* Create and render the individual pages.
*/
- pageno = 0;
for (page = doc->pages; page; page = page->next) {
object *opage, *cstr;
rect *r;
diff --git a/in_afm.c b/in_afm.c
index b2aacae..559bb5d 100644
--- a/in_afm.c
+++ b/in_afm.c
@@ -229,14 +229,12 @@ void read_afm_file(input *in) {
} else if (strcmp(key, "StartKernPairs") == 0 ||
strcmp(key, "StartKernPairs0") == 0) {
int nkerns, i;
- kern_pair *kerns;
if (!(val = strtok(NULL, " \t"))) {
error(err_afmval, &in->pos, key, 1);
goto giveup;
}
nkerns = atoi(val);
sfree(line);
- kerns = snewn(nkerns, kern_pair);
for (i = 0; i < nkerns; i++) {
line = afm_read_line(in);
if (line == NULL)
diff --git a/wcwidth.c b/wcwidth.c
index 269359f..bc4ae7f 100644
--- a/wcwidth.c
+++ b/wcwidth.c
@@ -144,13 +144,12 @@ int ustrwid(wchar_t const *s, int charset)
wid = 0;
while (len > 0) {
- int err, ret;
+ int err;
wchar_t const *s_orig;
err = 0;
s_orig = s;
- ret = charset_from_unicode(&s, &len, buf, lenof(buf),
- charset, &state, &err);
+ charset_from_unicode(&s, &len, buf, lenof(buf), charset, &state, &err);
wid += wcswidth(s_orig, s - s_orig);
if (err) {
assert(len > 0 && *s);