From: simon Date: Thu, 3 May 2012 17:43:21 +0000 (+0000) Subject: Remove a bunch of unused variables spotted by Ubuntu 12.04's gcc. X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/commitdiff_plain/944c4044572da20ed1fb9bc01085221856b53c1f Remove a bunch of unused variables spotted by Ubuntu 12.04's gcc. git-svn-id: svn://svn.tartarus.org/sgt/halibut@9478 cda61777-01e9-0310-a592-d414129be87e --- 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);