summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-01-10 14:08:15 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-01-10 14:08:15 +0000
commit0b095c9b5835bd49a04f77262f8007542330d140 (patch)
tree13a2297f430c3c0cf1328f18d116fe4092ebf3f5 /Build/source/texk/web2c
parent4a436b90db469ffdab8ae4fea378e64ecf3f4b20 (diff)
luaTeX, pdfTeX: Avoid various gcc warnings
git-svn-id: svn://tug.org/texlive/trunk@28788 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfgen.w2
-rw-r--r--Build/source/texk/web2c/pdftexdir/ChangeLog11
-rw-r--r--Build/source/texk/web2c/pdftexdir/macnames.c2
-rw-r--r--Build/source/texk/web2c/pdftexdir/mapfile.c4
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftex-common.h2
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftoepdf.cc2
-rw-r--r--Build/source/texk/web2c/pdftexdir/ttf2afm.c2
-rw-r--r--Build/source/texk/web2c/pdftexdir/utils.c2
-rw-r--r--Build/source/texk/web2c/pdftexdir/writet1.c8
10 files changed, 27 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 90adcc65366..934674a8ae8 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,7 @@
+2013-01-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * pdf/pdfgen.w (write_stream_length): Cast length for printing.
+
2012-12-16 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/libluatex.am (luatex_*_ctangle, pdflua.c):
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
index 5a7e3bb5b98..3543ec3b5ef 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
@@ -629,7 +629,7 @@ static void write_stream_length(PDF pdf, longinteger length, longinteger offset)
jobname_cstr = makecstring(job_name);
if (pdf->draftmode == 0) {
xfseeko(pdf->file, (off_t) offset, SEEK_SET, jobname_cstr);
- fprintf(pdf->file, "%" LONGINTEGER_PRI "i", length);
+ fprintf(pdf->file, "%" LONGINTEGER_PRI "i", (LONGINTEGER_TYPE) length);
xfseeko(pdf->file, (off_t) pdf_offset(pdf), SEEK_SET, jobname_cstr);
}
}
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
index 71be7fcaa11..f01489fae89 100644
--- a/Build/source/texk/web2c/pdftexdir/ChangeLog
+++ b/Build/source/texk/web2c/pdftexdir/ChangeLog
@@ -1,3 +1,14 @@
+2013-01-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * macnames.c, pdftex-common.h, pdftoepdf.cc, ttf2afm.c,
+ writet1.c: Change 'const char notdef[]' -> 'char notdef[]' and
+ remove casts (const char *) -> (char *).
+
+ * mapfile.c (dummy_fm_entry): Delare const_fm_entry as non-const
+ and remove the cast.
+
+ * utils.c (writestreamlength): Cast length for printing.
+
2012-12-16 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/pdftex.am (pdftex_version.h): Enable silent rules.
diff --git a/Build/source/texk/web2c/pdftexdir/macnames.c b/Build/source/texk/web2c/pdftexdir/macnames.c
index 4d919a284f7..360f5277364 100644
--- a/Build/source/texk/web2c/pdftexdir/macnames.c
+++ b/Build/source/texk/web2c/pdftexdir/macnames.c
@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-const char notdef[] = ".notdef";
+char notdef[] = ".notdef";
const char *mac_glyph_names[] = {
/* 0x00 */
diff --git a/Build/source/texk/web2c/pdftexdir/mapfile.c b/Build/source/texk/web2c/pdftexdir/mapfile.c
index 6345c575a04..1cc630ed695 100644
--- a/Build/source/texk/web2c/pdftexdir/mapfile.c
+++ b/Build/source/texk/web2c/pdftexdir/mapfile.c
@@ -109,8 +109,8 @@ static void delete_ff_entry(ff_entry * ff)
static fm_entry *dummy_fm_entry(void)
{
- static const fm_entry const_fm_entry;
- return (fm_entry *) & const_fm_entry;
+ static fm_entry const_fm_entry;
+ return & const_fm_entry;
}
/**********************************************************************/
diff --git a/Build/source/texk/web2c/pdftexdir/pdftex-common.h b/Build/source/texk/web2c/pdftexdir/pdftex-common.h
index 682574f6e0e..d30d0ad3626 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftex-common.h
+++ b/Build/source/texk/web2c/pdftexdir/pdftex-common.h
@@ -73,7 +73,7 @@ extern int get_fn_objnum(fd_entry *);
extern int is_subsetable(fm_entry *);
/* macnames.c */
-extern const char notdef[];
+extern char notdef[];
/* mapfile.c */
extern fm_entry *lookup_fontmap(char *);
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
index fca7a711434..b5cbadd023c 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -663,7 +663,7 @@ static void writeEncodings()
if ((s = ((Gfx8BitFont *) r->font)->getCharName(i)) != 0)
glyphNames[i] = s;
else
- glyphNames[i] = (char *) notdef;
+ glyphNames[i] = notdef;
}
epdf_write_enc(glyphNames, r->enc_objnum);
}
diff --git a/Build/source/texk/web2c/pdftexdir/ttf2afm.c b/Build/source/texk/web2c/pdftexdir/ttf2afm.c
index 5b85b3645ed..13f2b7b48ad 100644
--- a/Build/source/texk/web2c/pdftexdir/ttf2afm.c
+++ b/Build/source/texk/web2c/pdftexdir/ttf2afm.c
@@ -287,7 +287,7 @@ static void read_encoding(char *encname)
if (*enc_line != '/' || (r = strchr(enc_line, '[')) == 0)
ttf_fail("invalid encoding vector: name or `[' missing:\n%s", enc_line);
for (i = 0; i < 256; i++)
- enc_names[i] = (char *) notdef;
+ enc_names[i] = notdef;
if (r[1] == 32)
r += 2;
else
diff --git a/Build/source/texk/web2c/pdftexdir/utils.c b/Build/source/texk/web2c/pdftexdir/utils.c
index 7265b607e1e..ba6673503ad 100644
--- a/Build/source/texk/web2c/pdftexdir/utils.c
+++ b/Build/source/texk/web2c/pdftexdir/utils.c
@@ -414,7 +414,7 @@ void writestreamlength(longinteger length, longinteger offset)
jobname_cstr = xstrdup(makecstring(jobname));
if (fixedpdfdraftmode == 0) {
xfseeko(pdffile, (off_t) offset, SEEK_SET, jobname_cstr);
- fprintf(pdffile, "%" LONGINTEGER_PRI "i", length);
+ fprintf(pdffile, "%" LONGINTEGER_PRI "i", (LONGINTEGER_TYPE) length);
xfseeko(pdffile, (off_t) pdfoffset(), SEEK_SET, jobname_cstr);
}
}
diff --git a/Build/source/texk/web2c/pdftexdir/writet1.c b/Build/source/texk/web2c/pdftexdir/writet1.c
index bb2ded5aefb..02a5a483a73 100644
--- a/Build/source/texk/web2c/pdftexdir/writet1.c
+++ b/Build/source/texk/web2c/pdftexdir/writet1.c
@@ -240,7 +240,7 @@ char **load_enc_file(char *enc_name)
}
glyph_names = xtalloc(256, char *);
for (i = 0; i < 256; i++)
- glyph_names[i] = (char *) notdef;
+ glyph_names[i] = notdef;
t1_log("{");
t1_log(cur_file_name = (char *) nameoffile + 1);
enc_getline();
@@ -753,7 +753,7 @@ static void copy_glyph_names(char **glyph_names, int a, int b)
{
if (glyph_names[b] != notdef) {
xfree(glyph_names[b]);
- glyph_names[b] = (char *) notdef;
+ glyph_names[b] = notdef;
}
if (glyph_names[a] != notdef) {
glyph_names[b] = xstrdup(glyph_names[a]);
@@ -769,7 +769,7 @@ static char **t1_builtin_enc(void)
/* At this moment "/Encoding" is the prefix of t1_line_array */
glyph_names = xtalloc(256, char *);
for (i = 0; i < 256; i++)
- glyph_names[i] = (char *) notdef;
+ glyph_names[i] = notdef;
if (t1_suffix("def")) { /* predefined encoding */
sscanf(t1_line_array + strlen("/Encoding"), "%256s", t1_buf_array);
if (strcmp(t1_buf_array, "StandardEncoding") == 0) {
@@ -967,7 +967,7 @@ static void cs_store(boolean is_subr)
pdftex_fail
("CharStrings dict: more entries than dict size (%i)", cs_size);
if (strcmp(t1_buf_array + 1, notdef) == 0) /* skip the slash */
- ptr->name = (char *) notdef;
+ ptr->name = notdef;
else
ptr->name = xstrdup(t1_buf_array + 1);
}