From 129c1c0ef9266468d65fbcf846132b4329cad994 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 19 Apr 2011 13:44:09 +0000 Subject: Avoid Mac OS X compiler warnings, mainly 'differ in signedness' git-svn-id: svn://tug.org/texlive/trunk@22123 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/bibtex8/ChangeLog | 7 +++++++ Build/source/texk/bibtex8/bibtex-3.c | 2 +- Build/source/texk/bibtex8/datatype.h | 2 +- Build/source/texk/bibtex8/utils.c | 8 ++++---- 4 files changed, 13 insertions(+), 6 deletions(-) (limited to 'Build/source/texk/bibtex8') diff --git a/Build/source/texk/bibtex8/ChangeLog b/Build/source/texk/bibtex8/ChangeLog index 86ae827da7c..4af9c68dffe 100644 --- a/Build/source/texk/bibtex8/ChangeLog +++ b/Build/source/texk/bibtex8/ChangeLog @@ -1,3 +1,10 @@ +2011-04-18 Peter Breitenlohner + + Avoid 'differ in signedness' warnings. + * datatype.h (PdsType_T): Do not declare as unsigned. + * bibtex-3.c (pre_define): Cast xord[] index to UChar_T. + * utils.c (c8read_csf): Cast name_of_file to 'char *'. + 2011-03-07 Peter Breitenlohner * utils.c (setup_bound_variable): `program_invocation_name' has diff --git a/Build/source/texk/bibtex8/bibtex-3.c b/Build/source/texk/bibtex8/bibtex-3.c index aba857a3e2b..b7129558c11 100644 --- a/Build/source/texk/bibtex8/bibtex-3.c +++ b/Build/source/texk/bibtex8/bibtex-3.c @@ -380,7 +380,7 @@ BEGIN * Unlike the WEB, the string in `pds' will occupy the positions * pds[0] ... pds[len-1], rather than pds[1] ... pds[len]. *----------------------------------------------------------------------*/ - buffer[i] = xord[pds[i-1]]; + buffer[i] = xord[(UChar_T)pds[i-1]]; END pre_def_loc = str_lookup (buffer, 1, len, ilk, DO_INSERT); END diff --git a/Build/source/texk/bibtex8/datatype.h b/Build/source/texk/bibtex8/datatype.h index 3fe9d9b4a0d..5367ee78e42 100644 --- a/Build/source/texk/bibtex8/datatype.h +++ b/Build/source/texk/bibtex8/datatype.h @@ -167,7 +167,7 @@ typedef Integer8_T LexType_T; typedef Integer16_T LitStkLoc_T; typedef UChar_T PdsLen_T; typedef Integer8_T PdsLoc_T; -typedef const UChar_T *PdsType_T; +typedef const Char_T *PdsType_T; typedef Unsigned16_T PoolPointer_T; typedef Integer8_T StkType_T; typedef Integer16_T StrEntLoc_T; diff --git a/Build/source/texk/bibtex8/utils.c b/Build/source/texk/bibtex8/utils.c index 70f85cd9c14..adf605cefea 100644 --- a/Build/source/texk/bibtex8/utils.c +++ b/Build/source/texk/bibtex8/utils.c @@ -1767,11 +1767,11 @@ int c8read_csf (void) */ free (name_of_file); name_of_file = (unsigned char *) mymalloc (strlen (Str_csfile) + 5, "name_of_file"); - strcpy (name_of_file, Str_csfile); + strcpy ((char *)name_of_file, Str_csfile); - if (strchr (name_of_file, '.') == NULL) - strcat (name_of_file, ".csf"); - name_length = strlen (name_of_file); + if (strchr ((char *)name_of_file, '.') == NULL) + strcat ((char *)name_of_file, ".csf"); + name_length = strlen ((char *)name_of_file); debug_msg (DBG_CSF, "c8read_csf: trying to open CS file `%s' ...", name_of_file); -- cgit v1.2.3