summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-05-10 09:43:11 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-05-10 09:43:11 +0000
commita8c440bb418af0a8cd6a8e012a6f2cc3cafcee29 (patch)
tree78924fd08e2312c5aac2094632d3d7179b4d37d0 /Build/source
parentc1662ec68d00b00641d12f2bf30658916311f6e1 (diff)
remove more useless casts to void
reintroduce a few such cast to avoid complier warnings git-svn-id: svn://tug.org/texlive/trunk@18185 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/dvipsk/ChangeLog7
-rw-r--r--Build/source/texk/dvipsk/afm2tfm.c6
-rw-r--r--Build/source/texk/dvipsk/dviinput.c2
-rw-r--r--Build/source/texk/dvipsk/finclude.c4
-rw-r--r--Build/source/texk/dvipsk/flib.c6
-rw-r--r--Build/source/texk/dvipsk/loadfont.c4
-rw-r--r--Build/source/texk/dvipsk/output.c6
-rw-r--r--Build/source/texk/dvipsk/pprescan.c18
-rw-r--r--Build/source/texk/dvipsk/scanpage.c18
-rw-r--r--Build/source/texk/dvipsk/search.c2
-rw-r--r--Build/source/texk/dvipsk/virtualfont.c2
11 files changed, 41 insertions, 34 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog
index e37946d28a0..6c38a08d75b 100644
--- a/Build/source/texk/dvipsk/ChangeLog
+++ b/Build/source/texk/dvipsk/ChangeLog
@@ -1,3 +1,10 @@
+2010-05-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * all files: Remove more useless casts to void.
+
+ * afm2tfm.c, finclude.c, output.c, search.c: Reintroduce a few
+ casts to void, to avoid warnings (statement has no effect).
+
2010-05-10 Karl Berry <karl@tug.org>
* all files: remove useless casts to void.
diff --git a/Build/source/texk/dvipsk/afm2tfm.c b/Build/source/texk/dvipsk/afm2tfm.c
index 1c851cac63a..b2dc69ae1bf 100644
--- a/Build/source/texk/dvipsk/afm2tfm.c
+++ b/Build/source/texk/dvipsk/afm2tfm.c
@@ -479,7 +479,7 @@ handlechar(void) { /* an input line beginning with C */
/* Ignore vertical metrics information */
if (*param == 'W' && *(param + 1) == 'Y') {
expect("WY");
- (void)paramnum();
+ paramnum();
expect(";");
}
expect("N");
@@ -1687,7 +1687,7 @@ default: fprintf(stderr, "Unknown option %s %s ignored.\n", argv[2], argv[3]);
if ((afmin=fopen(inname, "r"))==NULL)
error("! can't open afm input file");
#endif /* KPATHSEA */
- SET_BINARY(fileno(afmin));
+ (void)SET_BINARY(fileno(afmin));
if (argc>3 || (argc==3 && *argv[2]=='-')) {
error("! need at most two non-option arguments");
@@ -1979,7 +1979,7 @@ readencoding(char *enc)
#else
afmin = fopen(enc, "r");
#endif
- SET_BINARY(fileno(afmin));
+ (void)SET_BINARY(fileno(afmin));
param = 0;
if (afmin == 0)
#ifdef KPATHSEA
diff --git a/Build/source/texk/dvipsk/dviinput.c b/Build/source/texk/dvipsk/dviinput.c
index c617409b225..f25e110da0f 100644
--- a/Build/source/texk/dvipsk/dviinput.c
+++ b/Build/source/texk/dvipsk/dviinput.c
@@ -85,5 +85,5 @@ signedquad(void)
void
skipover(int i)
{
- while (i-->0) (void)dvibyte();
+ while (i-->0) dvibyte();
}
diff --git a/Build/source/texk/dvipsk/finclude.c b/Build/source/texk/dvipsk/finclude.c
index fa2ca6b5dc4..b9a5d2d15bd 100644
--- a/Build/source/texk/dvipsk/finclude.c
+++ b/Build/source/texk/dvipsk/finclude.c
@@ -393,13 +393,13 @@ scanfontcomments(const char *filename)
* Allow scanning of ` commands. Better return same results both times.
*/
f = popen(filename+1, "r");
- SET_BINARY(fileno(f));
+ (void)SET_BINARY(fileno(f));
to_close = USE_PCLOSE;
} else {
f = search(figpath, filename, READ);
}
if (f) {
- SET_BINARY(fileno(f));
+ (void)SET_BINARY(fileno(f));
fc_state = 0;
check_atend = 0;
while (fgets(p,500,f) && p[0]=='%' &&
diff --git a/Build/source/texk/dvipsk/flib.c b/Build/source/texk/dvipsk/flib.c
index 8b3a8d8bf4e..18ed5475946 100644
--- a/Build/source/texk/dvipsk/flib.c
+++ b/Build/source/texk/dvipsk/flib.c
@@ -112,7 +112,7 @@ fliload(void)
numfonts = pkdouble(); /* number of fonts */
len = pkdouble(); /* length of comment */
for (i=0; i<len; i++)
- (void)pkbyte(); /* skip comment */
+ pkbyte(); /* skip comment */
#ifdef DEBUG
if (dd(D_FONTS))
fprintf(stderr,"Font library %s has %d font size%s, %d font%s\n",
@@ -138,7 +138,7 @@ fliload(void)
for (;numsizes>0; numsizes--, size++) {
/* for each font size in this library */
- (void)pkdouble(); /* length of size entry - ignore */
+ pkdouble(); /* length of size entry - ignore */
numfonts = pkdouble(); /* number of fonts */
dpi = pkquad(); /* DPI (fixed point 16.16) */
@@ -152,7 +152,7 @@ fliload(void)
size->entry = entry;
for (;numfonts > 0; numfonts--, entry++) {
/* read each entry */
- (void)pkquad(); /* ignore length of font */
+ pkquad(); /* ignore length of font */
entry->offset = pkquad(); /* offset to font */
len = pkbyte(); /* length of name */
for (i=0; i<len; i++)
diff --git a/Build/source/texk/dvipsk/loadfont.c b/Build/source/texk/dvipsk/loadfont.c
index 57810460ecb..ab1d7fe6c55 100644
--- a/Build/source/texk/dvipsk/loadfont.c
+++ b/Build/source/texk/dvipsk/loadfont.c
@@ -356,7 +356,7 @@ loadfont(register fontdesctype *curfnt)
if (pkbyte()!=89)
badpk("wrong id byte");
for(i=pkbyte(); i>0; i--)
- (void)pkbyte();
+ pkbyte();
k = (integer)(alpha * (real)pkquad());
if (k > curfnt->designsize + fsizetol
|| k < curfnt->designsize - fsizetol) {
@@ -422,7 +422,7 @@ case 7:
badpk("packet length too small");
if (dopprescan && ((cd->flags & EXISTS) == 0)) {
for (length--; length>0; length--)
- (void)pkbyte();
+ pkbyte();
} else {
if (cc > maxcc)
maxcc = cc;
diff --git a/Build/source/texk/dvipsk/output.c b/Build/source/texk/dvipsk/output.c
index c3aa22a435f..467066c62d3 100644
--- a/Build/source/texk/dvipsk/output.c
+++ b/Build/source/texk/dvipsk/output.c
@@ -152,7 +152,7 @@ copyfile_general(const char *s, struct header_list *cur_header)
sprintf(errbuf, "Execution of <%s> failed ", s);
f = popen(s, "r");
if (f != 0)
- SET_BINARY(fileno(f));
+ (void)SET_BINARY(fileno(f));
}
else {
sprintf(errbuf,"Secure mode is %d so execute <%s> will not run", secure,s);
@@ -1310,7 +1310,7 @@ open_output(void) {
#endif
if (pf == NULL && (pf = popen(oname+1, "w")) != NULL) {
popened = 1;
- SET_BINARY(fileno(pf));
+ (void)SET_BINARY(fileno(pf));
}
if (pf == NULL)
error("! couldn't open output pipe");
@@ -1322,7 +1322,7 @@ open_output(void) {
} else {
if ((bitfile=fopen(oname,"w"))==NULL)
error("! couldn't open PostScript file");
- SET_BINARY(fileno(bitfile));
+ (void)SET_BINARY(fileno(bitfile));
}
} else {
bitfile = stdout;
diff --git a/Build/source/texk/dvipsk/pprescan.c b/Build/source/texk/dvipsk/pprescan.c
index 1413f627fde..2e26e23a8e3 100644
--- a/Build/source/texk/dvipsk/pprescan.c
+++ b/Build/source/texk/dvipsk/pprescan.c
@@ -59,7 +59,7 @@ pscanpage(void)
switch (cmd=dvibyte()) {
case 255: /* pTeX's dir or undefined */
if (!noptex) {
- (void)dvibyte();
+ dvibyte();
break;
}
/* illegal commands */
@@ -70,22 +70,22 @@ case 250: case 251: case 252: case 253: case 254: /* undefined */
"! DVI file contains unexpected command (%d)",cmd);
error(errbuf);
case 132: case 137: /* eight-byte commands setrule, putrule */
- (void)dvibyte();
- (void)dvibyte();
- (void)dvibyte();
- (void)dvibyte();
+ dvibyte();
+ dvibyte();
+ dvibyte();
+ dvibyte();
case 146: case 151: case 156: case 160: case 165: case 170:
/* four-byte commands right4, w4, x4, down4, y4, z4 */
- (void)dvibyte();
+ dvibyte();
case 145: case 150: case 155: case 159: case 164: case 169:
/* three-byte commands right3, w3, x3, down3, y3, z3 */
- (void)dvibyte();
+ dvibyte();
case 144: case 149: case 154: case 158: case 163: case 168:
/* two-byte commands right2, w2, x2, down2, y2, z2 */
- (void)dvibyte();
+ dvibyte();
case 143: case 148: case 153: case 157: case 162: case 167:
/* one-byte commands right1, w1, x1, down1, y1, z1 */
- (void)dvibyte();
+ dvibyte();
case 147: case 152: case 161: case 166: /* w0, x0, y0, z0 */
case 138: case 141: case 142: /* nop, push, pop */
break;
diff --git a/Build/source/texk/dvipsk/scanpage.c b/Build/source/texk/dvipsk/scanpage.c
index 63e6494f53c..9315950bf83 100644
--- a/Build/source/texk/dvipsk/scanpage.c
+++ b/Build/source/texk/dvipsk/scanpage.c
@@ -135,7 +135,7 @@ scanpage(void)
switch (cmd=dvibyte()) {
case 255: /* pTeX's dir or undefined */
if (!noptex) {
- (void)dvibyte();
+ dvibyte();
break;
}
/* illegal commands */
@@ -146,22 +146,22 @@ case 250: case 251: case 252: case 253: case 254: /* undefined */
"! DVI file contains unexpected command (%d)",cmd);
error(errbuf);
case 132: case 137: /* eight-byte commands setrule, putrule */
- (void)dvibyte();
- (void)dvibyte();
- (void)dvibyte();
- (void)dvibyte();
+ dvibyte();
+ dvibyte();
+ dvibyte();
+ dvibyte();
case 146: case 151: case 156: case 160: case 165: case 170:
/* four-byte commands right4, w4, x4, down4, y4, z4 */
- (void)dvibyte();
+ dvibyte();
case 145: case 150: case 155: case 159: case 164: case 169:
/* three-byte commands right3, w3, x3, down3, y3, z3 */
- (void)dvibyte();
+ dvibyte();
case 144: case 149: case 154: case 158: case 163: case 168:
/* two-byte commands right2, w2, x2, down2, y2, z2 */
- (void)dvibyte();
+ dvibyte();
case 143: case 148: case 153: case 157: case 162: case 167:
/* one-byte commands right1, w1, x1, down1, y1, z1 */
- (void)dvibyte();
+ dvibyte();
case 147: case 152: case 161: case 166: /* w0, x0, y0, z0 */
case 138: case 141: case 142: /* nop, push, pop */
break;
diff --git a/Build/source/texk/dvipsk/search.c b/Build/source/texk/dvipsk/search.c
index e135ef2cd67..7259b8ef445 100644
--- a/Build/source/texk/dvipsk/search.c
+++ b/Build/source/texk/dvipsk/search.c
@@ -146,7 +146,7 @@ search(kpse_file_format_type format, const char *file, const char *mode)
char *prog = selfautoloc_prog (GUNZIP);
cmd = concat3 (prog, " -c ", quoted_name);
ret = popen (cmd, "r");
- SET_BINARY(fileno(ret));
+ (void)SET_BINARY(fileno(ret));
to_close = USE_PCLOSE;
free (cmd);
free (quoted_name);
diff --git a/Build/source/texk/dvipsk/virtualfont.c b/Build/source/texk/dvipsk/virtualfont.c
index b849218ba0e..f412a4db956 100644
--- a/Build/source/texk/dvipsk/virtualfont.c
+++ b/Build/source/texk/dvipsk/virtualfont.c
@@ -191,7 +191,7 @@ virtualfont(register fontdesctype *curfnt)
if (vfbyte()!=202)
badvf("wrong id byte");
for(i=vfbyte(); i>0; i--)
- (void)vfbyte();
+ vfbyte();
k = vfquad();
check_checksum (k, curfnt->checksum, curfnt->name);
k = (integer)(alpha * (real)vfquad());