summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/makejvf/ChangeLog7
-rw-r--r--Build/source/texk/makejvf/tfmread.c8
-rw-r--r--Build/source/texk/makejvf/tool.c14
-rw-r--r--Build/source/texk/makejvf/write.c18
4 files changed, 22 insertions, 25 deletions
diff --git a/Build/source/texk/makejvf/ChangeLog b/Build/source/texk/makejvf/ChangeLog
index 935cbf2550c..958ec1eb175 100644
--- a/Build/source/texk/makejvf/ChangeLog
+++ b/Build/source/texk/makejvf/ChangeLog
@@ -1,3 +1,10 @@
+2019-02-19 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * tfmread.c, tool.c: Avoid compiler warnings.
+ * write.c (writevfu): Removed unnecessary conditionals.
+ Thanks to @ngothan for a report by covscan.
+ https://github.com/TeX-Live/texlive-source/issues/11
+
2019-02-10 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* uniblock.c: Update references Unicode blocks Blocks-12.0.0.txt
diff --git a/Build/source/texk/makejvf/tfmread.c b/Build/source/texk/makejvf/tfmread.c
index dd77a91b082..f7ce53b6224 100644
--- a/Build/source/texk/makejvf/tfmread.c
+++ b/Build/source/texk/makejvf/tfmread.c
@@ -138,15 +138,15 @@ int tfmidx(FILE *fp)
header = xmalloc(lh*4);
for (i = 0 ; i < lh*4 ; i++) {
- header[i] = fgetc(fp);
+ header[i] = (char)fgetc(fp);
}
char_type = xmalloc(nt*4);
for (i = 0 ; i < nt*4 ; i++) {
- char_type[i] = fgetc(fp);
+ char_type[i] = (char)fgetc(fp);
}
char_info = xmalloc((ec+1)*4);
for (i = 0 ; i < (ec+1)*4 ; i++) {
- char_info[i] = fgetc(fp);
+ char_info[i] = (char)fgetc(fp);
}
width = xmalloc(nw*sizeof(int));
for (i = 0 ; i < nw ; i++) {
@@ -166,7 +166,7 @@ int tfmidx(FILE *fp)
}
glue_kern = xmalloc(nl*4);
for (i = 0 ; i < nl*4 ; i++) {
- glue_kern[i] = fgetc(fp);
+ glue_kern[i] = (char)fgetc(fp);
}
kern = xmalloc(nk*sizeof(int));
for (i = 0 ; i < nk ; i++) {
diff --git a/Build/source/texk/makejvf/tool.c b/Build/source/texk/makejvf/tool.c
index 7aeb6cace08..4046c56a11a 100644
--- a/Build/source/texk/makejvf/tool.c
+++ b/Build/source/texk/makejvf/tool.c
@@ -106,7 +106,7 @@ int fquad(FILE *fp)
unsigned char fchar[4];
for (i = 0 ; i < 4 ; i++)
- fchar[i] = fgetc(fp);
+ fchar[i] = (char)fgetc(fp);
cc = mquad(fchar);
return cc;
@@ -120,7 +120,7 @@ unsigned int uftri(FILE *fp)
fchar[0] = 0;
for (i = 1 ; i < 4 ; i++)
- fchar[i] = fgetc(fp);
+ fchar[i] = (char)fgetc(fp);
cc = mquad(fchar);
@@ -134,9 +134,9 @@ int ftri(FILE *fp)
int i,cc;
unsigned char fchar[4];
- fchar[0]=0;
- for (i=1;i<4;i++)
- fchar[i]=fgetc(fp);
+ fchar[0] = 0;
+ for (i = 1 ; i < 4 ; i++)
+ fchar[i] = (char)fgetc(fp);
cc = mquad(fchar);
@@ -153,7 +153,7 @@ unsigned int ufpair(FILE *fp)
fchar[0] = fchar[1] = 0;
for (i = 2 ; i < 4 ; i++)
- fchar[i] = fgetc(fp);
+ fchar[i] = (char)fgetc(fp);
cc = mquad(fchar);
@@ -167,7 +167,7 @@ int fpair(FILE *fp)
fchar[0] = fchar[1] = 0;
for (i = 2 ; i < 4 ; i++)
- fchar[i] = fgetc(fp);
+ fchar[i] = (char)fgetc(fp);
cc = mquad(fchar);
diff --git a/Build/source/texk/makejvf/write.c b/Build/source/texk/makejvf/write.c
index c978ad1850e..0b141ade7b9 100644
--- a/Build/source/texk/makejvf/write.c
+++ b/Build/source/texk/makejvf/write.c
@@ -401,13 +401,8 @@ void writevfu(int code, FILE *fp)
}
}
else
- skip = -(zw-w); /* skip=(int)((0.1)*zw); */
- if (code == 0x2018) {
- skip2+=0; /* skip2+=-(int)((0.65)*zh); */
- }
- else {
- skip2+=0; /* skip2+=-(int)((0.6)*zh); */
- }
+ skip = -(zw-w); /* changed */
+ /* no correction needed for skip2 */
if (kanatfm)
cc=4;
@@ -530,13 +525,8 @@ void writevfu(int code, FILE *fp)
}
}
else
- skip = zw; /* skip=(int)((0.4)*zw); */
- if (code == 0x2019) {
- skip2+=0; /* skip2+=(int)((0.65)*zh); */
- }
- else {
- skip2+=0; /* skip2+=(int)((0.6)*zh); */
- }
+ skip = zw; /* changed */
+ /* no correction needed for skip2 */
if (kanatfm)
cc=4;