diff options
author | Jjgod Jiang <gzjjgod@gmail.com> | 2014-08-04 21:56:36 +0000 |
---|---|---|
committer | Jjgod Jiang <gzjjgod@gmail.com> | 2014-08-04 21:56:36 +0000 |
commit | 74f38ed6a0ef898bb6a188e4d89bb85bb4ac7ebe (patch) | |
tree | 7d58c7aeee2d1a991e48365d2e95224db28b70d6 /Build | |
parent | 40cde69d904eb89fe89fcd7bc4b7d458d113fe6d (diff) |
Fix some warnings and remove unused code
git-svn-id: svn://tug.org/texlive/trunk@34837 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
37 files changed, 119 insertions, 184 deletions
diff --git a/Build/source/texk/dvipdfm-x/bmpimage.c b/Build/source/texk/dvipdfm-x/bmpimage.c index 1e08ae210f8..8b0bb8d221b 100644 --- a/Build/source/texk/dvipdfm-x/bmpimage.c +++ b/Build/source/texk/dvipdfm-x/bmpimage.c @@ -66,10 +66,7 @@ check_for_bmp (FILE *fp) if (fread(sigbytes, 1, sizeof(sigbytes), fp) != sizeof(sigbytes) || sigbytes[0] != 'B' || sigbytes[1] != 'M') return 0; - else - return 1; - - return 0; + return 1; } int diff --git a/Build/source/texk/dvipdfm-x/cid.c b/Build/source/texk/dvipdfm-x/cid.c index 90e19bf238b..ccfc0c711b9 100644 --- a/Build/source/texk/dvipdfm-x/cid.c +++ b/Build/source/texk/dvipdfm-x/cid.c @@ -176,14 +176,6 @@ void CIDFont_release (CIDFont *font) { if (font) { - switch(font->subtype) { - case CIDFONT_TYPE0: - CIDFont_type0_release(font); - break; - case CIDFONT_TYPE2: - CIDFont_type2_release(font); - break; - } if (font->indirect) ERROR("%s: Object not flushed.", CIDFONT_DEBUG_STR); if (font->fontdict) diff --git a/Build/source/texk/dvipdfm-x/cidtype0.c b/Build/source/texk/dvipdfm-x/cidtype0.c index 1605a536515..18c99e6129f 100644 --- a/Build/source/texk/dvipdfm-x/cidtype0.c +++ b/Build/source/texk/dvipdfm-x/cidtype0.c @@ -82,7 +82,7 @@ CIDFont_type0_set_flags (long flags) #endif static void -add_CIDHMetrics (sfnt *sfont, pdf_obj *fontdict, +add_CIDHMetrics (pdf_obj *fontdict, unsigned char *CIDToGIDMap, unsigned short last_cid, struct tt_maxp_table *maxp, struct tt_head_table *head, struct tt_longMetrics *hmtx) @@ -318,7 +318,7 @@ add_CIDMetrics (sfnt *sfont, pdf_obj *fontdict, sfnt_locate_table(sfont, "hmtx"); hmtx = tt_read_longMetrics(sfont, maxp->numGlyphs, hhea->numOfLongHorMetrics, hhea->numOfExSideBearings); - add_CIDHMetrics(sfont, fontdict, CIDToGIDMap, last_cid, maxp, head, hmtx); + add_CIDHMetrics(fontdict, CIDToGIDMap, last_cid, maxp, head, hmtx); if (need_vmetrics) add_CIDVMetrics(sfont, fontdict, CIDToGIDMap, last_cid, maxp, head, hmtx); @@ -1477,7 +1477,7 @@ create_ToUnicode_stream (cff_font *cffont, total_fail_count, glyph_count); WARN("ToUnicode CMap \"%s-UTF16\" removed.", font_name); } else { - stream = CMap_create_stream(cmap, 0); + stream = CMap_create_stream(cmap); } CMap_release(cmap); @@ -2041,9 +2041,3 @@ CIDFont_type0_t1dofont (CIDFont *font) return; } - -void -CIDFont_type0_release(CIDFont *font) -{ - return; -} diff --git a/Build/source/texk/dvipdfm-x/cidtype0.h b/Build/source/texk/dvipdfm-x/cidtype0.h index a529935b64c..7f3d61c1611 100644 --- a/Build/source/texk/dvipdfm-x/cidtype0.h +++ b/Build/source/texk/dvipdfm-x/cidtype0.h @@ -31,7 +31,6 @@ extern void CIDFont_type0_set_flags (long flags); extern int CIDFont_type0_open (CIDFont *font, const char *name, CIDSysInfo *cmap_csi, cid_opt *opt); extern void CIDFont_type0_dofont (CIDFont *font); -extern void CIDFont_type0_release (CIDFont *font); /* Type1 --> CFF CIDFont */ extern int t1_load_UnicodeCMap (const char *font_name, const char *otl_tags, int wmode); diff --git a/Build/source/texk/dvipdfm-x/cidtype2.c b/Build/source/texk/dvipdfm-x/cidtype2.c index 278ce18ea9f..1a7ef085a24 100644 --- a/Build/source/texk/dvipdfm-x/cidtype2.c +++ b/Build/source/texk/dvipdfm-x/cidtype2.c @@ -296,7 +296,7 @@ add_TTCIDHMetrics (pdf_obj *fontdict, struct tt_glyphs *g, static void add_TTCIDVMetrics (pdf_obj *fontdict, struct tt_glyphs *g, - char *used_chars, unsigned char *cidtogidmap, unsigned short last_cid) + char *used_chars, unsigned short last_cid) { pdf_obj *w2_array, *an_array = NULL; long cid; @@ -849,7 +849,7 @@ CIDFont_type2_dofont (CIDFont *font) } else { add_TTCIDHMetrics(font->fontdict, glyphs, used_chars, cidtogidmap, last_cid); if (v_used_chars) - add_TTCIDVMetrics(font->fontdict, glyphs, used_chars, cidtogidmap, last_cid); + add_TTCIDVMetrics(font->fontdict, glyphs, used_chars, last_cid); } tt_build_finish(glyphs); @@ -969,7 +969,6 @@ CIDFont_type2_open (CIDFont *font, const char *name, if (fp) DPXFCLOSE(fp); return -1; - break; } if (sfnt_read_table_directory(sfont, offset) < 0) { @@ -1093,9 +1092,3 @@ CIDFont_type2_open (CIDFont *font, const char *name, return 0; } - -void -CIDFont_type2_release (CIDFont *font) -{ - return; -} diff --git a/Build/source/texk/dvipdfm-x/cidtype2.h b/Build/source/texk/dvipdfm-x/cidtype2.h index f46d5dd63d9..00e39a3863d 100644 --- a/Build/source/texk/dvipdfm-x/cidtype2.h +++ b/Build/source/texk/dvipdfm-x/cidtype2.h @@ -30,6 +30,5 @@ extern void CIDFont_type2_set_flags (long flags); extern int CIDFont_type2_open (CIDFont *font, const char *name, CIDSysInfo *cmap_csi, cid_opt *opt); extern void CIDFont_type2_dofont (CIDFont *font); -extern void CIDFont_type2_release (CIDFont *font); #endif /* _CIDTYPE2_H_ */ diff --git a/Build/source/texk/dvipdfm-x/cmap_write.c b/Build/source/texk/dvipdfm-x/cmap_write.c index 51b7c62d486..4c1895a0aa4 100644 --- a/Build/source/texk/dvipdfm-x/cmap_write.c +++ b/Build/source/texk/dvipdfm-x/cmap_write.c @@ -238,7 +238,7 @@ end\n\ " pdf_obj * -CMap_create_stream (CMap *cmap, int flags) /* flags unused */ +CMap_create_stream (CMap *cmap) { pdf_obj *stream; pdf_obj *stream_dict; @@ -318,7 +318,7 @@ CMap_create_stream (CMap *cmap, int flags) /* flags unused */ } else { pdf_obj *ucmap_obj; - ucmap_obj = CMap_create_stream(cmap->useCMap, 0); + ucmap_obj = CMap_create_stream(cmap->useCMap); if (!ucmap_obj) { ERROR("Uh ah. I cannot continue..."); } diff --git a/Build/source/texk/dvipdfm-x/cmap_write.h b/Build/source/texk/dvipdfm-x/cmap_write.h index 61044ad6456..933c0b6f652 100644 --- a/Build/source/texk/dvipdfm-x/cmap_write.h +++ b/Build/source/texk/dvipdfm-x/cmap_write.h @@ -25,7 +25,7 @@ #include "cmap.h" -extern pdf_obj *CMap_create_stream (CMap *cmap, int flags); +extern pdf_obj *CMap_create_stream (CMap *cmap); extern pdf_obj *CMap_ToCode_stream (CMap *cmap, const char *cmap_name, CIDSysInfo *csi, int cmap_type, unsigned char *used_slot, int flags); diff --git a/Build/source/texk/dvipdfm-x/cs_type2.c b/Build/source/texk/dvipdfm-x/cs_type2.c index 0283649d8b3..00fc7d3c8aa 100644 --- a/Build/source/texk/dvipdfm-x/cs_type2.c +++ b/Build/source/texk/dvipdfm-x/cs_type2.c @@ -403,7 +403,6 @@ do_operator2 (card8 **dest, card8 *limit, card8 **data, card8 *endptr) WARN("Operator \"dotsection\" deprecated in Type 2 charstring."); status = CS_PARSE_ERROR; return; - break; case cs_hflex: case cs_flex: case cs_hflex1: diff --git a/Build/source/texk/dvipdfm-x/dpxfile.c b/Build/source/texk/dvipdfm-x/dpxfile.c index 116a70d0bf6..e2c4c7424b3 100644 --- a/Build/source/texk/dvipdfm-x/dpxfile.c +++ b/Build/source/texk/dvipdfm-x/dpxfile.c @@ -451,9 +451,6 @@ dpx_open_file (const char *filename, dpx_res_type type) case DPX_RES_TYPE_TEXT: fqpn = dpx_find__app__xyz(filename, "", 1); break; - default: - ERROR("Unknown resource type: %d", type); - break; } if (fqpn) { fp = MFOPEN(fqpn, FOPEN_RBIN_MODE); diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c index ee984d308cc..44729ecee12 100644 --- a/Build/source/texk/dvipdfm-x/dvi.c +++ b/Build/source/texk/dvipdfm-x/dvi.c @@ -2089,9 +2089,7 @@ do_pic_file(void) * the dvi file is here. */ void -dvi_do_page (long n, - double paper_width, double paper_height, - double hmargin, double vmargin) +dvi_do_page (double page_paper_height, double hmargin, double vmargin) { unsigned char opcode; @@ -2101,7 +2099,7 @@ dvi_do_page (long n, /* DVI coordinate */ dev_origin_x = hmargin; - dev_origin_y = paper_height - vmargin; + dev_origin_y = page_paper_height - vmargin; dvi_stack_depth = 0; for (;;) { diff --git a/Build/source/texk/dvipdfm-x/dvi.h b/Build/source/texk/dvipdfm-x/dvi.h index d1ad148ff0c..b5a219ff453 100644 --- a/Build/source/texk/dvipdfm-x/dvi.h +++ b/Build/source/texk/dvipdfm-x/dvi.h @@ -69,9 +69,7 @@ extern void dvi_z (SIGNED_QUAD ch); extern void dvi_z0 (void); extern void dvi_dir (UNSIGNED_BYTE dir); -extern void dvi_do_page (long page_no, - double paper_width, double paper_height, - double x_offset, double y_offset); +extern void dvi_do_page (double paper_height, double x_offset, double y_offset); extern void dvi_scan_specials (long page_no, double *width, double *height, double *x_offset, double *y_offset, diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c index 1fd33f64959..7dd76c984e9 100644 --- a/Build/source/texk/dvipdfm-x/dvipdfmx.c +++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c @@ -445,10 +445,12 @@ do_args (int argc, char *argv[]) compat_mode = 1; goto Out_of_For_Loop; } else if (!strcmp(flag, "kpathsea-debug")) { + int value; CHECK_ARG(1, "kpathsearch debugging flags"); - kpathsea_debug = atoi(argv[1]); - if (kpathsea_debug < 0) + value = atoi(argv[1]); + if (value < 0) ERROR("Invalid kpathsearch debugging flags specified: %s", argv[1]); + kpathsea_debug = value; POP_ARG(); goto Out_of_For_Loop; } @@ -810,8 +812,7 @@ do_dvi_pages (void) mediabox.ury = page_height; pdf_doc_set_mediabox(page_count+1, &mediabox); } - dvi_do_page(page_no, - page_width, page_height, x_offset, y_offset); + dvi_do_page(page_height, x_offset, y_offset); page_count++; MESG("]"); } diff --git a/Build/source/texk/dvipdfm-x/fontmap.c b/Build/source/texk/dvipdfm-x/fontmap.c index 91c6de71db0..5096ea14ef3 100644 --- a/Build/source/texk/dvipdfm-x/fontmap.c +++ b/Build/source/texk/dvipdfm-x/fontmap.c @@ -557,7 +557,6 @@ fontmap_parse_mapdef_dpm (fontmap_rec *mrec, default: WARN("Unrecognized font map option: '%c'", mopt); return -1; - break; } skip_blank(&p, endptr); } @@ -644,7 +643,6 @@ fontmap_parse_mapdef_dps (fontmap_rec *mrec, default: WARN("Found an invalid entry: %s", p); return -1; - break; } skip_blank(&p, endptr); } diff --git a/Build/source/texk/dvipdfm-x/jpegimage.c b/Build/source/texk/dvipdfm-x/jpegimage.c index bf1d963d981..be4f8fca4c9 100644 --- a/Build/source/texk/dvipdfm-x/jpegimage.c +++ b/Build/source/texk/dvipdfm-x/jpegimage.c @@ -193,7 +193,7 @@ struct JPEG_info static int JPEG_scan_file (struct JPEG_info *j_info, FILE *fp); static int JPEG_copy_stream (struct JPEG_info *j_info, - pdf_obj *stream, FILE *fp, int flags); /* flags unused yet */ + pdf_obj *stream, FILE *fp); static void JPEG_info_init (struct JPEG_info *j_info); static void JPEG_info_clear (struct JPEG_info *j_info); @@ -330,7 +330,7 @@ jpeg_include_image (pdf_ximage *ximage, FILE *fp) } /* Copy file */ - JPEG_copy_stream(&j_info, stream, fp, 0); + JPEG_copy_stream(&j_info, stream, fp); info.width = j_info.width; info.height = j_info.height; @@ -502,8 +502,6 @@ JPEG_get_marker (FILE *fp) return c; } } - - return -1; } static int @@ -528,7 +526,7 @@ add_APPn_marker (struct JPEG_info *j_info, } static unsigned short -read_APP14_Adobe (struct JPEG_info *j_info, FILE *fp, unsigned short length) +read_APP14_Adobe (struct JPEG_info *j_info, FILE *fp) { struct JPEG_APPn_Adobe *app_data; @@ -671,7 +669,7 @@ err: } static unsigned short -read_APP0_JFIF (struct JPEG_info *j_info, FILE *fp, unsigned short length) +read_APP0_JFIF (struct JPEG_info *j_info, FILE *fp) { struct JPEG_APPn_JFIF *app_data; unsigned short thumb_data_len; @@ -712,7 +710,7 @@ read_APP0_JFIF (struct JPEG_info *j_info, FILE *fp, unsigned short length) } static unsigned short -read_APP0_JFXX (struct JPEG_info *j_info, FILE *fp, unsigned short length) +read_APP0_JFXX (FILE *fp, unsigned short length) { get_unsigned_byte(fp); /* Extension Code: @@ -746,8 +744,7 @@ read_APP2_ICC (struct JPEG_info *j_info, FILE *fp, unsigned short length) } static int -JPEG_copy_stream (struct JPEG_info *j_info, - pdf_obj *stream, FILE *fp, int flags) /* flags unused yet */ +JPEG_copy_stream (struct JPEG_info *j_info, pdf_obj *stream, FILE *fp) { JPEG_marker marker; long length, nb_read; @@ -758,7 +755,7 @@ JPEG_copy_stream (struct JPEG_info *j_info, found_SOFn = 0; while (!found_SOFn && count < MAX_COUNT && - (marker = JPEG_get_marker(fp)) >= 0) { + (marker = JPEG_get_marker(fp)) != (JPEG_marker) -1) { if (marker == JM_SOI || (marker >= JM_RST0 && marker <= JM_RST7)) { work_buffer[0] = (char) 0xff; @@ -833,7 +830,7 @@ JPEG_scan_file (struct JPEG_info *j_info, FILE *fp) count = 0; found_SOFn = 0; while (!found_SOFn && - (marker = JPEG_get_marker(fp)) >= 0) { + (marker = JPEG_get_marker(fp)) != (JPEG_marker) -1) { if (marker == JM_SOI || (marker >= JM_RST0 && marker <= JM_RST7)) { count++; @@ -858,9 +855,9 @@ JPEG_scan_file (struct JPEG_info *j_info, FILE *fp) length -= 5; if (!memcmp(app_sig, "JFIF\000", 5)) { j_info->flags |= HAVE_APPn_JFIF; - length -= read_APP0_JFIF(j_info, fp, length); + length -= read_APP0_JFIF(j_info, fp); } else if (!memcmp(app_sig, "JFXX", 5)) { - length -= read_APP0_JFXX(j_info, fp, length); + length -= read_APP0_JFXX(fp, length); } } seek_relative(fp, length); @@ -899,7 +896,7 @@ JPEG_scan_file (struct JPEG_info *j_info, FILE *fp) length -= 5; if (!memcmp(app_sig, "Adobe", 5)) { j_info->flags |= HAVE_APPn_ADOBE; - length -= read_APP14_Adobe(j_info, fp, length); + length -= read_APP14_Adobe(j_info, fp); } else { if (count < MAX_COUNT) { j_info->skipbits[count/8] |= (1 << (7 - (count % 8))); diff --git a/Build/source/texk/dvipdfm-x/otl_conf.c b/Build/source/texk/dvipdfm-x/otl_conf.c index bb1f0f04b30..761ddf896e3 100644 --- a/Build/source/texk/dvipdfm-x/otl_conf.c +++ b/Build/source/texk/dvipdfm-x/otl_conf.c @@ -65,7 +65,6 @@ parse_uc_coverage (pdf_obj *gclass, const char **pp, const char *endptr) case ']': case ';': (*pp)++; return coverage; - break; case ',': (*pp)++; break; diff --git a/Build/source/texk/dvipdfm-x/otl_opt.c b/Build/source/texk/dvipdfm-x/otl_opt.c index bccf1d0afb0..38ed5b0562a 100644 --- a/Build/source/texk/dvipdfm-x/otl_opt.c +++ b/Build/source/texk/dvipdfm-x/otl_opt.c @@ -154,7 +154,6 @@ parse_expr (const char **pp, const char *endptr) break; case ')': return root; - break; case '|': case '&': if (*pp >= endptr) { WARN("Syntax error: %s\n", *pp); diff --git a/Build/source/texk/dvipdfm-x/pdfcolor.c b/Build/source/texk/dvipdfm-x/pdfcolor.c index 4e89008a305..140c5c5aa52 100644 --- a/Build/source/texk/dvipdfm-x/pdfcolor.c +++ b/Build/source/texk/dvipdfm-x/pdfcolor.c @@ -766,7 +766,6 @@ iccp_check_colorspace (int colortype, const void *profile, long proflen) break; default: return -1; - break; } return 0; diff --git a/Build/source/texk/dvipdfm-x/pdfencoding.c b/Build/source/texk/dvipdfm-x/pdfencoding.c index fd80980f00f..c7bc2722f56 100644 --- a/Build/source/texk/dvipdfm-x/pdfencoding.c +++ b/Build/source/texk/dvipdfm-x/pdfencoding.c @@ -689,7 +689,7 @@ pdf_create_ToUnicode_CMap (const char *enc_name, } } - stream = all_predef ? NULL : CMap_create_stream(cmap, 0); + stream = all_predef ? NULL : CMap_create_stream(cmap); CMap_release(cmap); RELEASE(cmap_name); @@ -723,7 +723,7 @@ pdf_load_ToUnicode_stream (const char *ident) if (verbose) { MESG("(CMap:%s)", ident); } - stream = CMap_create_stream(cmap, 0); + stream = CMap_create_stream(cmap); if (!stream) { WARN("Failed to creat ToUnicode CMap stream for \"%s\".", ident); } diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c index c0d5d5ddf3c..f2157e6371f 100644 --- a/Build/source/texk/dvipdfm-x/pdfobj.c +++ b/Build/source/texk/dvipdfm-x/pdfobj.c @@ -199,8 +199,7 @@ static void write_indirect (pdf_indirect *indirect, FILE *file); static void release_boolean (pdf_obj *data); static void write_boolean (pdf_boolean *data, FILE *file); -static void release_null (pdf_null *data); -static void write_null (pdf_null *data, FILE *file); +static void write_null (FILE *file); static void release_number (pdf_number *number); static void write_number (pdf_number *number, FILE *file); @@ -734,13 +733,7 @@ pdf_new_null (void) } static void -release_null (pdf_null *obj) -{ - return; -} - -static void -write_null (pdf_null *obj, FILE *file) +write_null (FILE *file) { pdf_out(file, "null", 4); } @@ -1914,7 +1907,7 @@ static void pdf_write_obj (pdf_obj *object, FILE *file) { if (object == NULL) { - write_null(NULL, file); + write_null(file); return; } @@ -1947,7 +1940,7 @@ pdf_write_obj (pdf_obj *object, FILE *file) write_stream(object->data, file); break; case PDF_NULL: - write_null(NULL, file); + write_null(file); break; case PDF_INDIRECT: write_indirect(object->data, file); @@ -2077,7 +2070,6 @@ pdf_release_obj (pdf_obj *object) release_boolean(object->data); break; case PDF_NULL: - release_null(object->data); break; case PDF_NUMBER: release_number(object->data); diff --git a/Build/source/texk/dvipdfm-x/pdfparse.c b/Build/source/texk/dvipdfm-x/pdfparse.c index 3e75a4cc775..860ea1c0abc 100644 --- a/Build/source/texk/dvipdfm-x/pdfparse.c +++ b/Build/source/texk/dvipdfm-x/pdfparse.c @@ -782,7 +782,7 @@ parse_pdf_array (const char **pp, const char *endptr, pdf_file *pf) } static pdf_obj * -parse_pdf_stream (const char **pp, const char *endptr, pdf_obj *dict, pdf_file *pf) +parse_pdf_stream (const char **pp, const char *endptr, pdf_obj *dict) { pdf_obj *result = NULL; const char *p; @@ -987,7 +987,7 @@ parse_pdf_object (const char **pp, const char *endptr, pdf_file *pf) *pp <= endptr - 15 && !memcmp(*pp, "stream", 6)) { dict = result; - result = parse_pdf_stream(pp, endptr, dict, pf); + result = parse_pdf_stream(pp, endptr, dict); pdf_release_obj(dict); } } diff --git a/Build/source/texk/dvipdfm-x/pkfont.c b/Build/source/texk/dvipdfm-x/pkfont.c index b5cce6cb5f8..6bcb2ab1b1e 100644 --- a/Build/source/texk/dvipdfm-x/pkfont.c +++ b/Build/source/texk/dvipdfm-x/pkfont.c @@ -158,7 +158,7 @@ fill_black_run (unsigned char *dp, long left, long run_count) /* Just skip bits. See decode_packed() */ static long -fill_white_run (unsigned char *dp, long left, long run_count) +fill_white_run (long run_count) { return run_count; } @@ -275,7 +275,7 @@ pk_decode_packed (pdf_obj *stream, long wd, long ht, rowbits_left -= fill_black_run(rowptr, 0, nbits); break; case 1: - rowbits_left -= fill_white_run(rowptr, 0, nbits); + rowbits_left -= fill_white_run(nbits); break; } run_count -= nbits; @@ -319,7 +319,7 @@ pk_decode_packed (pdf_obj *stream, long wd, long ht, rowbits_left -= fill_black_run(rowptr, wd - rowbits_left, nbits); break; case 1: - rowbits_left -= fill_white_run(rowptr, wd - rowbits_left, nbits); + rowbits_left -= fill_white_run(nbits); break; } } diff --git a/Build/source/texk/dvipdfm-x/pngimage.c b/Build/source/texk/dvipdfm-x/pngimage.c index 5e0e7817d5e..ec902dbcf59 100644 --- a/Build/source/texk/dvipdfm-x/pngimage.c +++ b/Build/source/texk/dvipdfm-x/pngimage.c @@ -134,7 +134,7 @@ static pdf_obj *strip_soft_mask (png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height); /* Read image body */ -static void read_image_data (png_structp png_ptr, png_infop info_ptr, +static void read_image_data (png_structp png_ptr, png_bytep dest_ptr, png_uint_32 height, png_uint_32 rowbytes); @@ -231,7 +231,7 @@ png_include_image (pdf_ximage *ximage, FILE *png_file) stream_dict = pdf_stream_dict(stream); stream_data_ptr = (png_bytep) NEW(rowbytes*height, png_byte); - read_image_data(png_ptr, png_info_ptr, stream_data_ptr, height, rowbytes); + read_image_data(png_ptr, stream_data_ptr, height, rowbytes); /* Non-NULL intent means there is valid sRGB chunk. */ intent = get_rendering_intent(png_ptr, png_info_ptr); @@ -1009,8 +1009,8 @@ strip_soft_mask (png_structp png_ptr, png_infop info_ptr, } static void -read_image_data (png_structp png_ptr, png_infop info_ptr, /* info_ptr unused */ - png_bytep dest_ptr, png_uint_32 height, png_uint_32 rowbytes) +read_image_data (png_structp png_ptr, png_bytep dest_ptr, + png_uint_32 height, png_uint_32 rowbytes) { png_bytepp rows_p; png_uint_32 i; diff --git a/Build/source/texk/dvipdfm-x/pst_obj.c b/Build/source/texk/dvipdfm-x/pst_obj.c index 2b92fa0b316..2d124faf7e9 100644 --- a/Build/source/texk/dvipdfm-x/pst_obj.c +++ b/Build/source/texk/dvipdfm-x/pst_obj.c @@ -66,7 +66,7 @@ static void pst_boolean_release (pst_boolean *obj); static long pst_boolean_IV (pst_boolean *obj); static double pst_boolean_RV (pst_boolean *obj); static unsigned char *pst_boolean_SV (pst_boolean *obj); -static long pst_boolean_length (pst_boolean *obj); +static long pst_boolean_length (); static void *pst_boolean_data_ptr(pst_boolean *obj); /* NUMBERS */ @@ -75,7 +75,7 @@ static void pst_integer_release (pst_integer *obj); static long pst_integer_IV (pst_integer *obj); static double pst_integer_RV (pst_integer *obj); static unsigned char *pst_integer_SV (pst_integer *obj); -static unsigned int pst_integer_length (pst_integer *obj); +static unsigned int pst_integer_length (); static void *pst_integer_data_ptr(pst_integer *obj); static pst_real *pst_real_new (double value) ; @@ -84,13 +84,13 @@ static long pst_real_IV (pst_real *obj); static double pst_real_RV (pst_real *obj); static unsigned char *pst_real_SV (pst_real *obj); static void *pst_real_data_ptr (pst_real *obj); -static unsigned int pst_real_length (pst_real *obj); +static unsigned int pst_real_length (); /* NAME */ static pst_name *pst_name_new (const char *name) ; static void pst_name_release (pst_name *obj); -static long pst_name_IV (pst_name *obj); -static double pst_name_RV (pst_name *obj); +static long pst_name_IV (); +static double pst_name_RV (); static unsigned char *pst_name_SV (pst_name *obj); static void *pst_name_data_ptr (pst_name *obj); static unsigned int pst_name_length (pst_name *obj); @@ -168,9 +168,9 @@ pst_length_of (pst_obj *obj) ASSERT(obj); switch (obj->type) { - case PST_TYPE_BOOLEAN: len = pst_boolean_length(obj->data); break; - case PST_TYPE_INTEGER: len = pst_integer_length(obj->data); break; - case PST_TYPE_REAL: len = pst_real_length(obj->data); break; + case PST_TYPE_BOOLEAN: len = pst_boolean_length(); break; + case PST_TYPE_INTEGER: len = pst_integer_length(); break; + case PST_TYPE_REAL: len = pst_real_length(); break; case PST_TYPE_NAME: len = pst_name_length(obj->data); break; case PST_TYPE_STRING: len = pst_string_length(obj->data); break; case PST_TYPE_NULL: @@ -197,7 +197,7 @@ pst_getIV (pst_obj *obj) case PST_TYPE_BOOLEAN: iv = pst_boolean_IV(obj->data); break; case PST_TYPE_INTEGER: iv = pst_integer_IV(obj->data); break; case PST_TYPE_REAL: iv = pst_real_IV(obj->data); break; - case PST_TYPE_NAME: iv = pst_name_IV(obj->data); break; + case PST_TYPE_NAME: iv = pst_name_IV(); break; case PST_TYPE_STRING: iv = pst_string_IV(obj->data); break; case PST_TYPE_NULL: case PST_TYPE_MARK: @@ -223,7 +223,7 @@ pst_getRV (pst_obj *obj) case PST_TYPE_BOOLEAN: rv = pst_boolean_RV(obj->data); break; case PST_TYPE_INTEGER: rv = pst_integer_RV(obj->data); break; case PST_TYPE_REAL: rv = pst_real_RV(obj->data); break; - case PST_TYPE_NAME: rv = pst_name_RV(obj->data); break; + case PST_TYPE_NAME: rv = pst_name_RV(); break; case PST_TYPE_STRING: rv = pst_string_RV(obj->data); break; case PST_TYPE_NULL: case PST_TYPE_MARK: @@ -355,7 +355,7 @@ pst_boolean_SV (pst_boolean *obj) } static long -pst_boolean_length (pst_boolean *obj) +pst_boolean_length () { TYPE_ERROR(); return 0; @@ -459,7 +459,7 @@ pst_integer_data_ptr (pst_integer *obj) } static unsigned int -pst_integer_length (pst_integer *obj) +pst_integer_length () { TYPE_ERROR(); return 0; @@ -524,7 +524,7 @@ pst_real_data_ptr (pst_real *obj) } static unsigned int -pst_real_length (pst_real *obj) +pst_real_length () { TYPE_ERROR(); return 0; @@ -678,14 +678,14 @@ pst_parse_name (unsigned char **inbuf, unsigned char *inbufend) /* / is required } static long -pst_name_IV (pst_name *obj) +pst_name_IV () { TYPE_ERROR(); return 0; } static double -pst_name_RV (pst_name *obj) +pst_name_RV () { TYPE_ERROR(); return 0; diff --git a/Build/source/texk/dvipdfm-x/spc_dvips.c b/Build/source/texk/dvipdfm-x/spc_dvips.c index 670ce0e2c27..b21b302783e 100644 --- a/Build/source/texk/dvipdfm-x/spc_dvips.c +++ b/Build/source/texk/dvipdfm-x/spc_dvips.c @@ -438,7 +438,7 @@ spc_handler_ps_tricks_brotate (struct spc_env *spe, struct spc_arg *args) char *cmd, *RotBegin; int i, l = args->endptr - args->curptr; - static const char *pre = "tx@Dict begin /RAngle { %f } def\n"; + static const char pre[] = "tx@Dict begin /RAngle { %f } def\n"; static const char *post = "= end"; if (!(++RAngleCount & 0x0f)) @@ -526,13 +526,11 @@ check_next_obj(const unsigned char * buffer) } static int -spc_handler_ps_tricks_parse_path (struct spc_env *spe, struct spc_arg *args, - int flag) +spc_handler_ps_tricks_parse_path (struct spc_env *spe, struct spc_arg *args) { FILE* fp; int k; pdf_tmatrix M; - char *distiller_template = get_distiller_template(); char *gs_out; const char *clip; int error; @@ -658,7 +656,6 @@ spc_handler_ps_tricks_render (struct spc_env *spe, struct spc_arg *args) if (check_next_obj((const unsigned char*)args->endptr)) { fclose(fp); } else { - char *distiller_template = get_distiller_template(); char *gs_out; int error, form_id; transform_info p; @@ -786,7 +783,7 @@ spc_handler_ps_trickscmd (struct spc_env *spe, struct spc_arg *args) if (f_exec & render) error |= spc_handler_ps_tricks_render(spe, args); if (f_exec & parse) - error |= spc_handler_ps_tricks_parse_path(spe, args, f_exec); + error |= spc_handler_ps_tricks_parse_path(spe, args); if (f_exec & begin_put) error |= spc_handler_ps_tricks_bput(spe, args, (f_exec & add_temp), (f_exec & req_ref)); if (f_exec & end_put) diff --git a/Build/source/texk/dvipdfm-x/spc_html.c b/Build/source/texk/dvipdfm-x/spc_html.c index 9e43bfae940..37374d55854 100644 --- a/Build/source/texk/dvipdfm-x/spc_html.c +++ b/Build/source/texk/dvipdfm-x/spc_html.c @@ -92,7 +92,8 @@ parse_key_val (const char **pp, const char *endptr, char **kp, char **vp) char *k, *v; int n, error = 0; - for (p = *pp ; p < endptr && isspace((unsigned char)*p); p++); + for (p = *pp ; p < endptr && isspace((unsigned char)*p); p++) + ; #if 0 while (!error && p < endptr && ((*p >= 'a' && *p <= 'z') || @@ -218,7 +219,7 @@ read_html_tag (char *name, pdf_obj *attr, int *type, const char **pp, const char static int -spc_handler_html__init (struct spc_env *spe, struct spc_arg *ap, void *dp) +spc_handler_html__init (void *dp) { struct spc_html_ *sd = dp; @@ -230,7 +231,7 @@ spc_handler_html__init (struct spc_env *spe, struct spc_arg *ap, void *dp) } static int -spc_handler_html__clean (struct spc_env *spe, struct spc_arg *ap, void *dp) +spc_handler_html__clean (struct spc_env *spe, void *dp) { struct spc_html_ *sd = dp; @@ -252,7 +253,7 @@ spc_handler_html__clean (struct spc_env *spe, struct spc_arg *ap, void *dp) static int -spc_handler_html__bophook (struct spc_env *spe, struct spc_arg *ap, void *dp) +spc_handler_html__bophook (struct spc_env *spe, void *dp) { struct spc_html_ *sd = dp; @@ -264,7 +265,7 @@ spc_handler_html__bophook (struct spc_env *spe, struct spc_arg *ap, void *dp) } static int -spc_handler_html__eophook (struct spc_env *spe, struct spc_arg *ap, void *dp) +spc_handler_html__eophook (struct spc_env *spe, void *dp) { struct spc_html_ *sd = dp; @@ -417,7 +418,7 @@ spc_html__anchor_open (struct spc_env *spe, pdf_obj *attr, struct spc_html_ *sd) } static int -spc_html__anchor_close (struct spc_env *spe, pdf_obj *attr, struct spc_html_ *sd) +spc_html__anchor_close (struct spc_env *spe, struct spc_html_ *sd) { int error = 0; @@ -565,7 +566,7 @@ check_resourcestatus (const char *category, const char *resname) #endif /* ENABLE_HTML_SVG_OPACITY */ static int -spc_html__img_empty (struct spc_env *spe, pdf_obj *attr, struct spc_html_ *sd) +spc_html__img_empty (struct spc_env *spe, pdf_obj *attr) { pdf_obj *src, *obj; transform_info ti; @@ -696,7 +697,7 @@ spc_html__img_empty (struct spc_env *spe, pdf_obj *attr, struct spc_html_ *sd) } #else static int -spc_html__img_empty (struct spc_env *spe, pdf_obj *attr, struct spc_html_ *sd) +spc_html__img_empty (struct spc_env *spe, pdf_obj *attr) { spc_warn(spe, "IMG tag not yet supported yet..."); return -1; @@ -727,7 +728,7 @@ spc_handler_html_default (struct spc_env *spe, struct spc_arg *ap) error = spc_html__anchor_open (spe, attr, sd); break; case HTML_TAG_TYPE_CLOSE: - error = spc_html__anchor_close(spe, attr, sd); + error = spc_html__anchor_close(spe, sd); break; default: spc_warn(spe, "Empty html anchor tag???"); @@ -746,7 +747,7 @@ spc_handler_html_default (struct spc_env *spe, struct spc_arg *ap) spc_warn(spe, "Close tag for \"img\"???"); error = -1; } else { /* treat "open" same as "empty" */ - error = spc_html__img_empty(spe, attr, sd); + error = spc_html__img_empty(spe, attr); } } pdf_release_obj(attr); @@ -872,28 +873,28 @@ int spc_html_at_begin_document (void) { struct spc_html_ *sd = &_html_state; - return spc_handler_html__init(NULL, NULL, sd); + return spc_handler_html__init(sd); } int spc_html_at_begin_page (void) { struct spc_html_ *sd = &_html_state; - return spc_handler_html__bophook(NULL, NULL, sd); + return spc_handler_html__bophook(NULL, sd); } int spc_html_at_end_page (void) { struct spc_html_ *sd = &_html_state; - return spc_handler_html__eophook(NULL, NULL, sd); + return spc_handler_html__eophook(NULL, sd); } int spc_html_at_end_document (void) { struct spc_html_ *sd = &_html_state; - return spc_handler_html__clean(NULL, NULL, sd); + return spc_handler_html__clean(NULL, sd); } diff --git a/Build/source/texk/dvipdfm-x/spc_pdfm.c b/Build/source/texk/dvipdfm-x/spc_pdfm.c index 5eb2dba61f5..368d978d50a 100644 --- a/Build/source/texk/dvipdfm-x/spc_pdfm.c +++ b/Build/source/texk/dvipdfm-x/spc_pdfm.c @@ -123,7 +123,7 @@ findresource (struct spc_pdf_ *sd, const char *ident) static int -spc_handler_pdfm__init (struct spc_env *spe, struct spc_arg *ap, void *dp) +spc_handler_pdfm__init (void *dp) { struct spc_pdf_ *sd = dp; static const char *default_taintkeys[] = { @@ -148,7 +148,7 @@ spc_handler_pdfm__init (struct spc_env *spe, struct spc_arg *ap, void *dp) } static int -spc_handler_pdfm__clean (struct spc_env *spe, struct spc_arg *ap, void *dp) +spc_handler_pdfm__clean (void *dp) { struct spc_pdf_ *sd = dp; @@ -176,14 +176,14 @@ int spc_pdfm_at_begin_document (void) { struct spc_pdf_ *sd = &_pdf_stat; - return spc_handler_pdfm__init(NULL, NULL, sd); + return spc_handler_pdfm__init(sd); } int spc_pdfm_at_end_document (void) { struct spc_pdf_ *sd = &_pdf_stat; - return spc_handler_pdfm__clean(NULL, NULL, sd); + return spc_handler_pdfm__clean(sd); } diff --git a/Build/source/texk/dvipdfm-x/spc_tpic.c b/Build/source/texk/dvipdfm-x/spc_tpic.c index e7a5c20a30d..7f1e8e76e55 100644 --- a/Build/source/texk/dvipdfm-x/spc_tpic.c +++ b/Build/source/texk/dvipdfm-x/spc_tpic.c @@ -738,8 +738,7 @@ spc_handler_tpic_tx (struct spc_env *spe, static int -spc_handler_tpic__init (struct spc_env *spe, - struct spc_arg *ap, void *dp) +spc_handler_tpic__init (struct spc_env *spe, void *dp) { struct spc_tpic_ *tp = dp; @@ -763,8 +762,7 @@ spc_handler_tpic__init (struct spc_env *spe, } static int -spc_handler_tpic__bophook (struct spc_env *spe, - struct spc_arg *ap, void *dp) +spc_handler_tpic__bophook (void *dp) { struct spc_tpic_ *tp = dp; @@ -776,8 +774,7 @@ spc_handler_tpic__bophook (struct spc_env *spe, } static int -spc_handler_tpic__eophook (struct spc_env *spe, - struct spc_arg *ap, void *dp) +spc_handler_tpic__eophook (struct spc_env *spe, void *dp) { struct spc_tpic_ *tp = dp; @@ -791,8 +788,7 @@ spc_handler_tpic__eophook (struct spc_env *spe, } static int -spc_handler_tpic__clean (struct spc_env *spe, - struct spc_arg *ap, void *dp) +spc_handler_tpic__clean (struct spc_env *spe, void *dp) { struct spc_tpic_ *tp = dp; @@ -821,14 +817,14 @@ int spc_tpic_at_begin_page (void) { struct spc_tpic_ *tp = &_tpic_state; - return spc_handler_tpic__bophook(NULL, NULL, tp); + return spc_handler_tpic__bophook(tp); } int spc_tpic_at_end_page (void) { struct spc_tpic_ *tp = &_tpic_state; - return spc_handler_tpic__eophook(NULL, NULL, tp); + return spc_handler_tpic__eophook(NULL, tp); } @@ -836,14 +832,14 @@ int spc_tpic_at_begin_document (void) { struct spc_tpic_ *tp = &_tpic_state; - return spc_handler_tpic__init(NULL, NULL, tp); + return spc_handler_tpic__init(NULL, tp); } int spc_tpic_at_end_document (void) { struct spc_tpic_ *tp = &_tpic_state; - return spc_handler_tpic__clean(NULL, NULL, tp); + return spc_handler_tpic__clean(NULL, tp); } @@ -851,7 +847,7 @@ spc_tpic_at_end_document (void) #include "pdfparse.h" /* parse_val_ident :( */ static pdf_obj * -spc_parse_kvpairs (struct spc_env *spe, struct spc_arg *ap) +spc_parse_kvpairs (struct spc_arg *ap) { pdf_obj *dict; char *kp, *vp; @@ -939,13 +935,13 @@ tpic_filter_getopts (pdf_obj *kp, pdf_obj *vp, void *dp) static int spc_handler_tpic__setopts (struct spc_env *spe, - struct spc_arg *ap ) /* , void *dp) */ + struct spc_arg *ap) { struct spc_tpic_ *tp = &_tpic_state; pdf_obj *dict; int error = 0; - dict = spc_parse_kvpairs(spe, ap); + dict = spc_parse_kvpairs(ap); if (!dict) return -1; error = pdf_foreach_dict(dict, tpic_filter_getopts, tp); diff --git a/Build/source/texk/dvipdfm-x/spc_util.c b/Build/source/texk/dvipdfm-x/spc_util.c index 5639f0d32eb..ad2d7468c03 100644 --- a/Build/source/texk/dvipdfm-x/spc_util.c +++ b/Build/source/texk/dvipdfm-x/spc_util.c @@ -55,8 +55,7 @@ skip_blank (const char **pp, const char *endptr) static int pdf_color_namedcolor (pdf_color *color, const char *colorname); int -spc_util_read_numbers (double *values, int num_values, - struct spc_env *spe, struct spc_arg *args) +spc_util_read_numbers (double *values, int num_values, struct spc_arg *args) { int count; char *q; @@ -123,7 +122,7 @@ spc_read_color_color (struct spc_env *spe, pdf_color *colorspec, struct spc_arg skip_blank(&ap->curptr, ap->endptr); if (!strcmp(q, "rgb")) { /* Handle rgb color */ - nc = spc_util_read_numbers(cv, 3, spe, ap); + nc = spc_util_read_numbers(cv, 3, ap); if (nc != 3) { spc_warn(spe, "Invalid value for RGB color specification."); error = -1; @@ -131,7 +130,7 @@ spc_read_color_color (struct spc_env *spe, pdf_color *colorspec, struct spc_arg pdf_color_rgbcolor(colorspec, cv[0], cv[1], cv[2]); } } else if (!strcmp(q, "cmyk")) { /* Handle cmyk color */ - nc = spc_util_read_numbers(cv, 4, spe, ap); + nc = spc_util_read_numbers(cv, 4, ap); if (nc != 4) { spc_warn(spe, "Invalid value for CMYK color specification."); error = -1; @@ -139,7 +138,7 @@ spc_read_color_color (struct spc_env *spe, pdf_color *colorspec, struct spc_arg pdf_color_cmykcolor(colorspec, cv[0], cv[1], cv[2], cv[3]); } } else if (!strcmp(q, "gray")) { /* Handle gray */ - nc = spc_util_read_numbers(cv, 1, spe, ap); + nc = spc_util_read_numbers(cv, 1, ap); if (nc != 1) { spc_warn(spe, "Invalid value for gray color specification."); error = -1; @@ -147,7 +146,7 @@ spc_read_color_color (struct spc_env *spe, pdf_color *colorspec, struct spc_arg pdf_color_graycolor(colorspec, cv[0]); } } else if (!strcmp(q, "hsb")) { - nc = spc_util_read_numbers(cv, 3, spe, ap); + nc = spc_util_read_numbers(cv, 3, ap); if (nc != 3) { spc_warn(spe, "Invalid value for HSB color specification."); error = -1; @@ -188,7 +187,7 @@ spc_read_color_pdf (struct spc_env *spe, pdf_color *colorspec, struct spc_arg *a isarry = 1; } - nc = spc_util_read_numbers(cv, 4, spe, ap); + nc = spc_util_read_numbers(cv, 4, ap); switch (nc) { case 1: pdf_color_graycolor(colorspec, cv[0]); @@ -597,7 +596,7 @@ spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *a case K_TRN__BBOX: { double v[4]; - if (spc_util_read_numbers(v, 4, spe, ap) != 4) + if (spc_util_read_numbers(v, 4, ap) != 4) error = -1; else { p->bbox.llx = v[0]; @@ -611,7 +610,7 @@ spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *a case K_TRN__MATRIX: { double v[6]; - if (spc_util_read_numbers(v, 6, spe, ap) != 6) + if (spc_util_read_numbers(v, 6, ap) != 6) error = -1; else { pdf_setmatrix(&(p->matrix), v[0], v[1], v[2], v[3], v[4], v[5]); @@ -634,7 +633,7 @@ spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *a case K__PAGE: { double page; - if (page_no && spc_util_read_numbers(&page, 1, spe, ap) == 1) + if (page_no && spc_util_read_numbers(&page, 1, ap) == 1) *page_no = (long) page; else error = -1; @@ -695,8 +694,6 @@ spc_util_read_dimtrns (struct spc_env *spe, transform_info *ti, struct spc_arg * } else { return spc_read_dimtrns_pdfm (spe, ti, args, page_no); } - - return -1; } diff --git a/Build/source/texk/dvipdfm-x/spc_util.h b/Build/source/texk/dvipdfm-x/spc_util.h index b2db90785bd..bc97bcb5b36 100644 --- a/Build/source/texk/dvipdfm-x/spc_util.h +++ b/Build/source/texk/dvipdfm-x/spc_util.h @@ -36,7 +36,7 @@ extern int spc_util_read_colorspec (struct spc_env *spe, pdf_color *colorspec, struct spc_arg *args, int syntax); extern int spc_util_read_dimtrns (struct spc_env *spe, transform_info *dimtrns, struct spc_arg *args, long *page, int syntax); -extern int spc_util_read_numbers (double *values, int num_values, struct spc_env *spe, struct spc_arg *args); +extern int spc_util_read_numbers (double *values, int num_values, struct spc_arg *args); extern int spc_util_read_pdfcolor (struct spc_env *spe, pdf_color *colorspec, struct spc_arg *args, pdf_color *defaultcolor); #endif /* _SPC_UTIL_H_ */ diff --git a/Build/source/texk/dvipdfm-x/spc_xtx.c b/Build/source/texk/dvipdfm-x/spc_xtx.c index 115a87566c2..c52146a6566 100644 --- a/Build/source/texk/dvipdfm-x/spc_xtx.c +++ b/Build/source/texk/dvipdfm-x/spc_xtx.c @@ -85,7 +85,7 @@ spc_handler_xtx_scale (struct spc_env *spe, struct spc_arg *args) { double values[2]; - if (spc_util_read_numbers(&values[0], 2, spe, args) < 2) { + if (spc_util_read_numbers(&values[0], 2, args) < 2) { return -1; } args->curptr = args->endptr; @@ -104,7 +104,7 @@ spc_handler_xtx_bscale (struct spc_env *spe, struct spc_arg *args) if (!(++scaleFactorCount & 0x0f)) scaleFactors = realloc(scaleFactors, (scaleFactorCount + 16) * sizeof(pdf_coord)); - if (spc_util_read_numbers(&values[0], 2, spe, args) < 2) { + if (spc_util_read_numbers(&values[0], 2, args) < 2) { return -1; } if (fabs(values[0]) < 1.e-7 || fabs(values[1]) < 1.e-7) { @@ -132,7 +132,7 @@ spc_handler_xtx_rotate (struct spc_env *spe, struct spc_arg *args) { double value; - if (spc_util_read_numbers(&value, 1, spe, args) < 1) { + if (spc_util_read_numbers(&value, 1, args) < 1) { return -1; } args->curptr = args->endptr; @@ -324,7 +324,7 @@ spc_handler_xtx_renderingmode (struct spc_env *spe, struct spc_arg *args) { double value; - if (spc_util_read_numbers(&value, 1, spe, args) < 1) { + if (spc_util_read_numbers(&value, 1, args) < 1) { return -1; } if ((int) value < 0 || (int) value > 7) { diff --git a/Build/source/texk/dvipdfm-x/t1_char.c b/Build/source/texk/dvipdfm-x/t1_char.c index 3ed91b4c6b4..e42487660bb 100644 --- a/Build/source/texk/dvipdfm-x/t1_char.c +++ b/Build/source/texk/dvipdfm-x/t1_char.c @@ -422,7 +422,7 @@ release_charpath (t1_chardesc *cd) * Single byte operators: */ static void -do_operator1 (t1_chardesc *cd, card8 **data, card8 *endptr) +do_operator1 (t1_chardesc *cd, card8 **data) { card8 op = **data; @@ -635,7 +635,7 @@ do_othersubr0 (t1_chardesc *cd) /* Start flex */ static void -do_othersubr1 (t1_chardesc *cd) +do_othersubr1 () { phase = T1_CS_PHASE_FLEX; } @@ -679,7 +679,7 @@ do_othersubr3 (t1_chardesc *cd) } static void -do_othersubr12 (t1_chardesc *cd) +do_othersubr12 () { /* Othersubr12 call must immediately follow the hsbw or sbw. */ if (phase != T1_CS_PHASE_INIT) { @@ -786,10 +786,10 @@ do_callothersubr (t1_chardesc *cd) switch (subrno) { case 0: do_othersubr0(cd) ; break; - case 1: do_othersubr1(cd) ; break; + case 1: do_othersubr1() ; break; case 2: do_othersubr2(cd) ; break; case 3: do_othersubr3(cd) ; break; - case 12: do_othersubr12(cd); break; + case 12: do_othersubr12() ; break; case 13: do_othersubr13(cd); break; default: ERROR("Unknown othersubr #%ld.", subrno); @@ -1089,7 +1089,7 @@ t1char_build_charpath (t1_chardesc *cd, } else if (b0 == cs_escape) { do_operator2(cd, data, endptr); } else if (b0 < 32 && b0 != 28) { /* 19, 20 need mask */ - do_operator1(cd, data, endptr); + do_operator1(cd, data); } else if ((b0 <= 22 && b0 >= 27) || b0 == 31) { /* reserved */ status = CS_PARSE_ERROR; /* not an error ? */ } else { /* integer */ diff --git a/Build/source/texk/dvipdfm-x/t1_load.c b/Build/source/texk/dvipdfm-x/t1_load.c index d6c73578a01..dfa59759d3d 100644 --- a/Build/source/texk/dvipdfm-x/t1_load.c +++ b/Build/source/texk/dvipdfm-x/t1_load.c @@ -323,7 +323,7 @@ static const char *const ISOLatin1Encoding[256] = { }; static int -parse_encoding (char **enc_vec, unsigned char **start, unsigned char *end, int mode) +parse_encoding (char **enc_vec, unsigned char **start, unsigned char *end) { pst_obj *tok; int code; @@ -846,7 +846,7 @@ parse_part2 (cff_font *font, unsigned char **start, unsigned char *end, int mode static long parse_part1 (cff_font *font, char **enc_vec, - unsigned char **start, unsigned char *end, int mode) + unsigned char **start, unsigned char *end) { char *key, *strval; double argv[MAX_ARGS]; @@ -863,7 +863,7 @@ parse_part1 (cff_font *font, char **enc_vec, while (*start < end && (key = get_next_key(start, end)) != NULL) { if (!strcmp(key, "Encoding")) { - if (parse_encoding(enc_vec, start, end, mode) < 0) { + if (parse_encoding(enc_vec, start, end) < 0) { RELEASE(key); return -1; } @@ -1004,8 +1004,6 @@ is_pfb (FILE *fp) WARN("Not a PFB font file?"); return 0; } - - return 0; } @@ -1174,7 +1172,7 @@ t1_load_font (char **enc_vec, int mode, FILE *fp) init_cff_font(cff); start = buffer; end = buffer + length; - if (parse_part1(cff, enc_vec, &start, end, mode) < 0) { + if (parse_part1(cff, enc_vec, &start, end) < 0) { cff_close(cff); RELEASE(buffer); ERROR("Reading PFB (ASCII part) file failed."); diff --git a/Build/source/texk/dvipdfm-x/tfm.c b/Build/source/texk/dvipdfm-x/tfm.c index 403a0829fa6..f7334d413ce 100644 --- a/Build/source/texk/dvipdfm-x/tfm.c +++ b/Build/source/texk/dvipdfm-x/tfm.c @@ -213,8 +213,6 @@ lookup_char (const struct char_map *map, long charcode) return map->indices[CHARACTER_INDEX(charcode - map->coverage.first_char)]; else return -1; - - return -1; } static long diff --git a/Build/source/texk/dvipdfm-x/tt_cmap.c b/Build/source/texk/dvipdfm-x/tt_cmap.c index 05a0cb3bd30..26b340f8f57 100644 --- a/Build/source/texk/dvipdfm-x/tt_cmap.c +++ b/Build/source/texk/dvipdfm-x/tt_cmap.c @@ -364,9 +364,6 @@ lookup_cmap6 (struct cmap6 *map, USHORT cc) idx = cc - map->firstCode; if (idx < map->entryCount) return map->glyphIndexArray[idx]; - else - return 0; - return 0; } @@ -1159,7 +1156,7 @@ create_ToUnicode_cmap (tt_cmap *ttcmap, if (count < 1) stream = NULL; else { - stream = CMap_create_stream(cmap, 0); + stream = CMap_create_stream(cmap); } CMap_release(cmap); diff --git a/Build/source/texk/dvipdfm-x/type1.c b/Build/source/texk/dvipdfm-x/type1.c index d7557eddb8b..28460b5c8a3 100644 --- a/Build/source/texk/dvipdfm-x/type1.c +++ b/Build/source/texk/dvipdfm-x/type1.c @@ -356,7 +356,7 @@ add_metrics (pdf_font *font, cff_font *cffont, char **enc_vec, double *widths, l static long -write_fontfile (pdf_font *font, cff_font *cffont, long num_glyphs) +write_fontfile (pdf_font *font, cff_font *cffont) { pdf_obj *descriptor; pdf_obj *fontfile, *stream_dict; @@ -776,7 +776,7 @@ pdf_font_load_type1 (pdf_font *font) add_metrics(font, cffont, enc_vec, widths, num_glyphs); - offset = write_fontfile(font, cffont, num_glyphs); + offset = write_fontfile(font, cffont); if (verbose > 1) MESG("[%u glyphs][%ld bytes]", num_glyphs, offset); diff --git a/Build/source/texk/dvipdfm-x/xbb.c b/Build/source/texk/dvipdfm-x/xbb.c index ec7a384398a..25841155b7e 100644 --- a/Build/source/texk/dvipdfm-x/xbb.c +++ b/Build/source/texk/dvipdfm-x/xbb.c @@ -119,7 +119,7 @@ static void write_xbb(char *fname, int pdf_version, long pagecount) { char *outname = NULL; - FILE *fp; + FILE *fp = NULL; long bbllx = ROUND(bbllx_f, 1.0), bblly = ROUND(bblly_f, 1.0); long bburx = ROUND(bburx_f, 1.0), bbury = ROUND(bbury_f, 1.0); |