summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-03-05 08:50:28 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-03-05 08:50:28 +0000
commitedc562bfa3e97201709f690ae5c738b150dc365c (patch)
treef503ef4c651ce308e73c294ba085da48f155d66f /Build/source
parentfd915ec757813cf18b6929c70136a63965d31327 (diff)
build: Avoid various (gcc-4.x) compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@25567 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog6
-rw-r--r--Build/source/texk/kpathsea/lib.h2
-rw-r--r--Build/source/texk/mendexk/ChangeLog5
-rw-r--r--Build/source/texk/mendexk/fread.c2
-rw-r--r--Build/source/texk/ptexenc/ChangeLog5
-rw-r--r--Build/source/texk/ptexenc/ptexenc.c2
-rw-r--r--Build/source/texk/web2c/ChangeLog5
-rw-r--r--Build/source/texk/web2c/cpascal.h1
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog5
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c2
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/ptexdir/pbibtex.ch4
-rw-r--r--Build/source/texk/web2c/ptexdir/ppltotf.ch8
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch16
-rw-r--r--Build/source/texk/web2c/uptexdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/uptexdir/uppltotf.ch14
-rw-r--r--Build/source/texk/web2c/uptexdir/uptex-m.ch40
-rw-r--r--Build/source/texk/web2c/web2c/ChangeLog5
-rw-r--r--Build/source/texk/web2c/web2c/common.defines3
-rw-r--r--Build/source/texk/xdvipdfmx/ChangeLog.TL6
-rw-r--r--Build/source/texk/xdvipdfmx/src/pdfdraw.c2
21 files changed, 98 insertions, 47 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 261715995fb..355e77eb39b 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'the address of XXX will always evaluate as true' warnings.
+ * lib.h (STREQ): Test '(s) != NULL' instead of '(s)'.
+ Gcc >=4.3 produces identical code but -Wall yields no warning.
+
2012-03-01 Peter Breitenlohner <peb@mppmu.mpg.de>
* c-unistd.h: Declare getopt() (via <kpathsea/getopt.h>) but
diff --git a/Build/source/texk/kpathsea/lib.h b/Build/source/texk/kpathsea/lib.h
index 13a4f4c7c8c..89a50dc961b 100644
--- a/Build/source/texk/kpathsea/lib.h
+++ b/Build/source/texk/kpathsea/lib.h
@@ -94,7 +94,7 @@
/* I find this easier to read. */
-#define STREQ(s1, s2) ((s1) && (s2) && (strcmp (s1, s2) == 0))
+#define STREQ(s1, s2) (((s1) != NULL) && ((s2) != NULL) && (strcmp (s1, s2) == 0))
#define STRNEQ(s1, s2, n) ((s1) && (s2) && (strncmp (s1, s2, n) == 0))
/* Support for FAT/ISO-9660 filesystems. Theoretically this should be
diff --git a/Build/source/texk/mendexk/ChangeLog b/Build/source/texk/mendexk/ChangeLog
index cbdff1122b7..01dd6507b56 100644
--- a/Build/source/texk/mendexk/ChangeLog
+++ b/Build/source/texk/mendexk/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'differ in signedness' warnings.
+ * fread.c (mfgets): Cast buf to 'char *'.
+
2011-10-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* kp.c: program name should be mendex.
diff --git a/Build/source/texk/mendexk/fread.c b/Build/source/texk/mendexk/fread.c
index 74a0c5e19fa..b1b8d906826 100644
--- a/Build/source/texk/mendexk/fread.c
+++ b/Build/source/texk/mendexk/fread.c
@@ -559,7 +559,7 @@ char *mfgets(char *buf, int byte, FILE *fp)
{
int c, len;
- if ((len = input_line2(fp, buf, 0, byte, &c)) == 0) return NULL;
+ if ((len = input_line2(fp, (unsigned char *) buf, 0, byte, &c)) == 0) return NULL;
if (c == '\n' || c == '\r') {
if (len+1 < byte) strcat(buf+len, "\n");
else ungetc(c, fp);
diff --git a/Build/source/texk/ptexenc/ChangeLog b/Build/source/texk/ptexenc/ChangeLog
index 23ecf51a44d..aa4a7f78e27 100644
--- a/Build/source/texk/ptexenc/ChangeLog
+++ b/Build/source/texk/ptexenc/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'differ in signedness' warnings.
+ * ptexenc.c (write_hex): Cast buffer to 'char *'.
+
2012-02-29 Ken Brown <kbrow1i@gmail.com>
* Makefile.am (libptexenc_la_LIBADD): Add $(KPATHSEA_LIBS) as
diff --git a/Build/source/texk/ptexenc/ptexenc.c b/Build/source/texk/ptexenc/ptexenc.c
index 59a17cdea4d..5bee9a9bdc8 100644
--- a/Build/source/texk/ptexenc/ptexenc.c
+++ b/Build/source/texk/ptexenc/ptexenc.c
@@ -540,7 +540,7 @@ static void write_multibyte(long i)
static void write_hex(int i)
{
- sprintf(buffer + last, "^^%02x", i);
+ sprintf((char *) buffer + last, "^^%02x", i);
last += 4;
}
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 959c98ebfd5..f090a6afeac 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'differ in signedness' warnings.
+ * cpascal.h: Define ustringcast().
+
2012-02-16 Peter Breitenlohner <peb@mppmu.mpg.de>
* mf.ch, tex.ch: Remove test for end-of-file after undump.
diff --git a/Build/source/texk/web2c/cpascal.h b/Build/source/texk/web2c/cpascal.h
index c9717f28c1a..dcd6b495f87 100644
--- a/Build/source/texk/web2c/cpascal.h
+++ b/Build/source/texk/web2c/cpascal.h
@@ -126,6 +126,7 @@ typedef FILE *text;
#define intcast(x) ((integer) (x))
#define stringcast(x) ((string) (x))
#define conststringcast(x) ((const_string) (x))
+#define ustringcast(x) ((unsigned char *) (x))
/* For throwing away input from the file F. */
#define vgetc(f) (void) getc (f)
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index 4eee4d5d44b..d567c2e53c8 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'differ in signedness' warnings.
+ * texmfmp.c (input_line): Cast buffer to 'unsigned char *'.
+
2012-02-14 Peter Breitenlohner <peb@mppmu.mpg.de>
* eofeoln.c (eof): Fix a typo in comment.
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index f3682cfbb6d..d435d7cc466 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -2080,7 +2080,7 @@ input_line (FILE *f)
/* Recognize either LF or CR as a line terminator. */
#if IS_pTeX
- last = input_line2(f, (char *)buffer, first, bufsize, &i);
+ last = input_line2(f, (unsigned char *)buffer, first, bufsize, &i);
#else
#ifdef WIN32
if (f != Poptr && fileno (f) != fileno (stdin)) {
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index dbf239c0316..734a649903d 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'differ in signedness' warnings.
+ * pbibtex.ch, ppltotf.ch: Use ustringcast(buffer).
+ * ptex-base.ch: Use ustringcast for buffer and str_pool.
+
2012-01-22 Peter Breitenlohner <peb@mppmu.mpg.de>
* ptftopl.ch: Adapt to missing space added in ../tftopl.ch.
diff --git a/Build/source/texk/web2c/ptexdir/pbibtex.ch b/Build/source/texk/web2c/ptexdir/pbibtex.ch
index 7cfad468a70..5a6adc4112a 100644
--- a/Build/source/texk/web2c/ptexdir/pbibtex.ch
+++ b/Build/source/texk/web2c/ptexdir/pbibtex.ch
@@ -201,11 +201,11 @@ var i:c_int_type;
end;
vgetc (f); {skip the eol}
@y
- last := input_line2(f,stringcast(buffer),last,buf_size,address_of(i));
+ last := input_line2(f,ustringcast(buffer),last,buf_size,address_of(i));
while (not eof(f)) and (last > 0) and (i <> 10) and (i <> 13) do
begin
buffer_overflow;
- last := input_line2(f,stringcast(buffer),last,buf_size,address_of(i));
+ last := input_line2(f,ustringcast(buffer),last,buf_size,address_of(i));
end;
@z
diff --git a/Build/source/texk/web2c/ptexdir/ppltotf.ch b/Build/source/texk/web2c/ptexdir/ppltotf.ch
index da930c7ad22..d7d68421a85 100644
--- a/Build/source/texk/web2c/ptexdir/ppltotf.ch
+++ b/Build/source/texk/web2c/ptexdir/ppltotf.ch
@@ -65,7 +65,7 @@ else begin while (limit<buf_size-2)and(not eoln(pl_file)) do
begin incr(limit); read(pl_file,buffer[limit]);
end;
@y
-else begin limit:=input_line2(pl_file,stringcast(buffer),limit+1,buf_size-1)-1;
+else begin limit:=input_line2(pl_file,ustringcast(buffer),limit+1,buf_size-1)-1;
@z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -653,7 +653,7 @@ The |jis_to_index| is called from |chars_in_type| command.
function get_next_raw:byte; {get next rawdata in buffer}
begin while loc=limit do fill_buffer;
incr(loc); get_next_raw:=buffer[loc];
-if multistrlen(stringcast(buffer),loc+2,loc)=2 then cur_char:=" "
+if multistrlen(ustringcast(buffer),loc+2,loc)=2 then cur_char:=" "
else cur_char:=xord[buffer[loc]];
end;
@#
@@ -724,8 +724,8 @@ else if (ch='J')or(ch='j') then
if not valid_jis_code(jis_code) then
err_print('jis code ', jis_code:1, ' is invalid');
end
-else if multistrlen(stringcast(buffer), loc+2, loc)=2 then
- begin jis_code:=toDVI(fromBUFF(stringcast(buffer), loc+2, loc));
+else if multistrlen(ustringcast(buffer), loc+2, loc)=2 then
+ begin jis_code:=toDVI(fromBUFF(ustringcast(buffer), loc+2, loc));
incr(loc); cur_char:=" ";
if not valid_jis_code(jis_code) then
err_print('jis code ', jis_code:1, ' is invalid');
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index 759e4b5bbd0..c62b9ac59c3 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -1581,8 +1581,8 @@ begin switch: if loc<=limit then {current line not yet finished}
@^inner loop@>
begin switch: if loc<=limit then {current line not yet finished}
begin cur_chr:=buffer[loc]; incr(loc);
- if multistrlen(stringcast(buffer), limit+1, loc-1)=2 then
- begin cur_chr:=fromBUFF(stringcast(buffer), limit+1, loc-1);
+ if multistrlen(ustringcast(buffer), limit+1, loc-1)=2 then
+ begin cur_chr:=fromBUFF(ustringcast(buffer), limit+1, loc-1);
cur_cmd:=kcat_code(kcatcodekey(cur_chr));
incr(loc);
end
@@ -1671,8 +1671,8 @@ end
@<Scan a control...@>=
begin if loc>limit then cur_cs:=null_cs {|state| is irrelevant in this case}
else begin k:=loc; cur_chr:=buffer[k]; incr(k);
- if multistrlen(stringcast(buffer), limit+1, k-1)=2 then
- begin cat:=kcat_code(kcatcodekey(fromBUFF(stringcast(buffer), limit+1, k-1))); incr(k);
+ if multistrlen(ustringcast(buffer), limit+1, k-1)=2 then
+ begin cat:=kcat_code(kcatcodekey(fromBUFF(ustringcast(buffer), limit+1, k-1))); incr(k);
end
else cat:=cat_code(cur_chr);
start_cs:
@@ -1755,8 +1755,8 @@ end
@y
@ @<Scan ahead in the buffer...@>=
begin repeat cur_chr:=buffer[k]; incr(k);
- if multistrlen(stringcast(buffer), limit+1, k-1)=2 then
- begin cat:=kcat_code(kcatcodekey(fromBUFF(stringcast(buffer), limit+1, k-1))); incr(k);
+ if multistrlen(ustringcast(buffer), limit+1, k-1)=2 then
+ begin cat:=kcat_code(kcatcodekey(fromBUFF(ustringcast(buffer), limit+1, k-1))); incr(k);
end
else cat:=cat_code(cur_chr);
while (buffer[k]=cur_chr)and(cat=sup_mark)and(k<limit) do
@@ -2193,8 +2193,8 @@ else if scan_keyword("sp") then goto done
if t=" " then t:=space_token
else t:=other_token+t;
@y
- if multistrlen(stringcast(str_pool), pool_ptr, k)=2 then
- begin t:=fromBUFF(stringcast(str_pool), pool_ptr, k); incr(k);
+ if multistrlen(ustringcast(str_pool), pool_ptr, k)=2 then
+ begin t:=fromBUFF(ustringcast(str_pool), pool_ptr, k); incr(k);
end
else if t=" " then t:=space_token
else t:=other_token+t;
diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog
index b2602ec14ba..1159939ece7 100644
--- a/Build/source/texk/web2c/uptexdir/ChangeLog
+++ b/Build/source/texk/web2c/uptexdir/ChangeLog
@@ -1,3 +1,9 @@
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'differ in signedness' warnings.
+ * uppltotf.ch: Use ustringcast(buffer).
+ * uptex-m.ch: Use ustringcast for buffer and str_pool.
+
2012-01-15 Takuji Tanaka <KXD02663@nifty.ne.jp>
* uptex-m.ch, uppltotf.ch uptftopl.ch, updvitype.ch, upbibtex.ch:
diff --git a/Build/source/texk/web2c/uptexdir/uppltotf.ch b/Build/source/texk/web2c/uptexdir/uppltotf.ch
index 1b62068a7e8..802e9262847 100644
--- a/Build/source/texk/web2c/uptexdir/uppltotf.ch
+++ b/Build/source/texk/web2c/uptexdir/uppltotf.ch
@@ -31,9 +31,9 @@ max_kanji=65535; { maximam number of 2byte characters }
@z
@x function get_next_raw
-if multistrlen(stringcast(buffer),loc+2,loc)=2 then cur_char:=" "
+if multistrlen(ustringcast(buffer),loc+2,loc)=2 then cur_char:=" "
@y
-if multistrlen(stringcast(buffer),loc+3,loc)>1 then cur_char:=" "
+if multistrlen(ustringcast(buffer),loc+3,loc)>1 then cur_char:=" "
@z
@x function valid_jis_code
@@ -75,8 +75,8 @@ index_to_jis:=ix;
@z
@x function get_kanji
-else if multistrlen(stringcast(buffer), loc+2, loc)=2 then
- begin jis_code:=toDVI(fromBUFF(stringcast(buffer), loc+2, loc));
+else if multistrlen(ustringcast(buffer), loc+2, loc)=2 then
+ begin jis_code:=toDVI(fromBUFF(ustringcast(buffer), loc+2, loc));
incr(loc); cur_char:=" ";
@y
else if (ch='U')or(ch='u') then
@@ -90,9 +90,9 @@ else if (ch='U')or(ch='u') then
if not valid_jis_code(jis_code) then
err_print('jis code ', jis_code:1, ' is invalid');
end
-else if multistrlen(stringcast(buffer), loc+4, loc)>1 then
+else if multistrlen(ustringcast(buffer), loc+4, loc)>1 then
begin cur_char:=" ";
- jis_code:=toDVI(fromBUFF(stringcast(buffer), loc+4, loc));
- loc:=loc+multistrlen(stringcast(buffer), loc+4, loc)-1;
+ jis_code:=toDVI(fromBUFF(ustringcast(buffer), loc+4, loc));
+ loc:=loc+multistrlen(ustringcast(buffer), loc+4, loc)-1;
@z
diff --git a/Build/source/texk/web2c/uptexdir/uptex-m.ch b/Build/source/texk/web2c/uptexdir/uptex-m.ch
index 7474aab010a..5ff0d91e6df 100644
--- a/Build/source/texk/web2c/uptexdir/uptex-m.ch
+++ b/Build/source/texk/web2c/uptexdir/uptex-m.ch
@@ -361,19 +361,19 @@ if ((kcp mod @'10)>0)and(nrestmultichr(kcp)>0) then p:=p-(kcp mod @'10);
@x
begin cur_chr:=buffer[loc]; incr(loc);
- if multistrlen(stringcast(buffer), limit+1, loc-1)=2 then
- begin cur_chr:=fromBUFF(stringcast(buffer), limit+1, loc-1);
+ if multistrlen(ustringcast(buffer), limit+1, loc-1)=2 then
+ begin cur_chr:=fromBUFF(ustringcast(buffer), limit+1, loc-1);
cur_cmd:=kcat_code(kcatcodekey(cur_chr));
incr(loc);
end
else reswitch: cur_cmd:=cat_code(cur_chr);
@y
begin
- cur_chr:=fromBUFF(stringcast(buffer), limit, loc);
+ cur_chr:=fromBUFF(ustringcast(buffer), limit, loc);
cur_cmd:=kcat_code(kcatcodekey(cur_chr));
- if (multistrlen(stringcast(buffer), limit, loc)>1) and check_kcat_code(cur_cmd) then begin
+ if (multistrlen(ustringcast(buffer), limit, loc)>1) and check_kcat_code(cur_cmd) then begin
if (cur_cmd=not_cjk) then cur_cmd:=other_kchar;
- loc:=loc+multistrlen(stringcast(buffer), limit, loc) end
+ loc:=loc+multistrlen(ustringcast(buffer), limit, loc) end
else begin
cur_chr:=buffer[loc]; incr(loc);
reswitch: cur_cmd:=cat_code(cur_chr);
@@ -403,19 +403,19 @@ hangul_code(skip_blanks),hangul_code(new_line),hangul_code(mid_kanji):
@x
else begin k:=loc; cur_chr:=buffer[k]; incr(k);
- if multistrlen(stringcast(buffer), limit+1, k-1)=2 then
- begin cat:=kcat_code(kcatcodekey(fromBUFF(stringcast(buffer), limit+1, k-1))); incr(k);
+ if multistrlen(ustringcast(buffer), limit+1, k-1)=2 then
+ begin cat:=kcat_code(kcatcodekey(fromBUFF(ustringcast(buffer), limit+1, k-1))); incr(k);
end
else cat:=cat_code(cur_chr);
start_cs:
if (cat=letter)or(cat=kanji)or(cat=kana) then state:=skip_blanks
@y
else begin k:=loc;
- cur_chr:=fromBUFF(stringcast(buffer), limit, k);
+ cur_chr:=fromBUFF(ustringcast(buffer), limit, k);
cat:=kcat_code(kcatcodekey(cur_chr));
- if (multistrlen(stringcast(buffer), limit, k)>1) and check_kcat_code(cat) then begin
+ if (multistrlen(ustringcast(buffer), limit, k)>1) and check_kcat_code(cat) then begin
if (cat=not_cjk) then cat:=other_kchar;
- k:=k+multistrlen(stringcast(buffer), limit, k) end
+ k:=k+multistrlen(ustringcast(buffer), limit, k) end
else begin {not multi-byte char}
cur_chr:=buffer[k];
cat:=cat_code(cur_chr);
@@ -433,17 +433,17 @@ start_cs:
@x
begin repeat cur_chr:=buffer[k]; incr(k);
- if multistrlen(stringcast(buffer), limit+1, k-1)=2 then
- begin cat:=kcat_code(kcatcodekey(fromBUFF(stringcast(buffer), limit+1, k-1))); incr(k);
+ if multistrlen(ustringcast(buffer), limit+1, k-1)=2 then
+ begin cat:=kcat_code(kcatcodekey(fromBUFF(ustringcast(buffer), limit+1, k-1))); incr(k);
end
else cat:=cat_code(cur_chr);
@y
begin repeat
- cur_chr:=fromBUFF(stringcast(buffer), limit, k);
+ cur_chr:=fromBUFF(ustringcast(buffer), limit, k);
cat:=kcat_code(kcatcodekey(cur_chr));
- if (multistrlen(stringcast(buffer), limit, k)>1) and check_kcat_code(cat) then begin
+ if (multistrlen(ustringcast(buffer), limit, k)>1) and check_kcat_code(cat) then begin
if (cat=not_cjk) then cat:=other_kchar;
- k:=k+multistrlen(stringcast(buffer), limit, k) end
+ k:=k+multistrlen(ustringcast(buffer), limit, k) end
else begin {not multi-byte char}
cur_chr:=buffer[k];
cat:=cat_code(cur_chr);
@@ -545,8 +545,8 @@ begin str_room(1);
p:=temp_head; link(p):=null; k:=b;
while k<pool_ptr do
begin t:=so(str_pool[k]);
- if multistrlen(stringcast(str_pool), pool_ptr, k)=2 then
- begin t:=fromBUFF(stringcast(str_pool), pool_ptr, k); incr(k);
+ if multistrlen(ustringcast(str_pool), pool_ptr, k)=2 then
+ begin t:=fromBUFF(ustringcast(str_pool), pool_ptr, k); incr(k);
end
else if t=" " then t:=space_token
else t:=other_token+t;
@@ -557,13 +557,13 @@ while k<pool_ptr do
begin str_room(1);
p:=temp_head; link(p):=null; k:=b;
while k<pool_ptr do
- begin t:=fromBUFF(stringcast(str_pool), pool_ptr, k);
+ begin t:=fromBUFF(ustringcast(str_pool), pool_ptr, k);
cc:=kcat_code(kcatcodekey(t));
- if (multistrlen(stringcast(str_pool), pool_ptr, k)>1)and
+ if (multistrlen(ustringcast(str_pool), pool_ptr, k)>1)and
check_kcat_code(cc) then
begin if (cc=not_cjk) then cc:=other_kchar;
t:=t+cc*max_cjk_val;
- k:=k+multistrlen(stringcast(str_pool), pool_ptr, k)-1;
+ k:=k+multistrlen(ustringcast(str_pool), pool_ptr, k)-1;
end
else begin t:=so(str_pool[k]);
if t=" " then t:=space_token
diff --git a/Build/source/texk/web2c/web2c/ChangeLog b/Build/source/texk/web2c/web2c/ChangeLog
index b2f709262d5..a2459045767 100644
--- a/Build/source/texk/web2c/web2c/ChangeLog
+++ b/Build/source/texk/web2c/web2c/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'differ in signedness' warnings.
+ * common.defines: Define ustringcast().
+
2012-02-06 Peter Breitenlohner <peb@mppmu.mpg.de>
* texmf.defines: Moved writedvi from here ...
diff --git a/Build/source/texk/web2c/web2c/common.defines b/Build/source/texk/web2c/web2c/common.defines
index 3e86f6b9efa..0923add990a 100644
--- a/Build/source/texk/web2c/web2c/common.defines
+++ b/Build/source/texk/web2c/web2c/common.defines
@@ -107,6 +107,7 @@
@define function chartostring ();
@define function chr ();
@define function cmdline ();
+@define function conststringcast ();
@define function eof ();
@define function eoln ();
@define function extendfilename ();
@@ -140,11 +141,11 @@
@define function round ();
@define function strcmp ();
@define function stringcast ();
-@define function conststringcast ();
@define function strlen ();
@define function strtol ();
@define function trunc ();
@define function ucharcast ();
+@define function ustringcast ();
@define function xcalloc ();
@define function xcallocarray ();
@define function xftell ();
diff --git a/Build/source/texk/xdvipdfmx/ChangeLog.TL b/Build/source/texk/xdvipdfmx/ChangeLog.TL
index 81ba0d4a503..b571158605c 100644
--- a/Build/source/texk/xdvipdfmx/ChangeLog.TL
+++ b/Build/source/texk/xdvipdfmx/ChangeLog.TL
@@ -1,6 +1,12 @@
ChangeLog.TL: TeX Live (TL) changes for xdvipdfmx
=================================================
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'the address of XXX will always evaluate as true' warnings.
+ * pdfdraw.c (m_stack_depth): Use '(s) != NULL' instead of '(s)'.
+ Gcc >=4.3 produces identical code but -Wall yields no warning.
+
2012-02-28 Peter Breitenlohner <peb@mppmu.mpg.de>
* configure.ac: Fixed a typo (no libpaper for TeX Live builds).
diff --git a/Build/source/texk/xdvipdfmx/src/pdfdraw.c b/Build/source/texk/xdvipdfmx/src/pdfdraw.c
index 9e0a4fad0bd..55de69b1866 100644
--- a/Build/source/texk/xdvipdfmx/src/pdfdraw.c
+++ b/Build/source/texk/xdvipdfmx/src/pdfdraw.c
@@ -1001,7 +1001,7 @@ m_stack_top (m_stack *stack)
return data;
}
-#define m_stack_depth(s) ((s) ? (s)->size : 0)
+#define m_stack_depth(s) (((s) != NULL) ? (s)->size : 0)
static m_stack gs_stack;