diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-04-19 13:44:09 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-04-19 13:44:09 +0000 |
commit | 129c1c0ef9266468d65fbcf846132b4329cad994 (patch) | |
tree | 0aeb7c371bb33f4fb69501b7715c82b769957896 /Build/source/texk/bibtexu | |
parent | 880a5b0998e88b6c3a3c50b3058f0139bf9b1211 (diff) |
Avoid Mac OS X compiler warnings, mainly 'differ in signedness'
git-svn-id: svn://tug.org/texlive/trunk@22123 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/bibtexu')
-rw-r--r-- | Build/source/texk/bibtexu/ChangeLog | 8 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/bibtex-2.c | 8 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/bibtex-3.c | 2 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/datatype.h | 2 | ||||
-rw-r--r-- | Build/source/texk/bibtexu/utils.c | 8 |
5 files changed, 18 insertions, 10 deletions
diff --git a/Build/source/texk/bibtexu/ChangeLog b/Build/source/texk/bibtexu/ChangeLog index 62e5b2cf769..e600d91d4bd 100644 --- a/Build/source/texk/bibtexu/ChangeLog +++ b/Build/source/texk/bibtexu/ChangeLog @@ -1,3 +1,11 @@ +2011-04-18 Peter Breitenlohner <peb@mppmu.mpg.de> + + 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 *'. + * bibtex-2.c: A few casts to 'char *'. + 2011-03-07 Peter Breitenlohner <peb@mppmu.mpg.de> * utils.c (setup_bound_variable): `program_invocation_name' has diff --git a/Build/source/texk/bibtexu/bibtex-2.c b/Build/source/texk/bibtexu/bibtex-2.c index 4385fa3c346..694ce44bda3 100644 --- a/Build/source/texk/bibtexu/bibtex-2.c +++ b/Build/source/texk/bibtexu/bibtex-2.c @@ -3045,8 +3045,8 @@ BEGIN ptr1 = (arg1 * num_ent_strs) + sort_key_num; ptr2 = (arg2 * num_ent_strs) + sort_key_num; - lenk1= strlen(&ENTRY_STRS(ptr1, 0)); - lenk2= strlen(&ENTRY_STRS(ptr2, 0)); + lenk1= strlen((char *)&ENTRY_STRS(ptr1, 0)); + lenk2= strlen((char *)&ENTRY_STRS(ptr2, 0)); uchlen1 = icu_toUChars(entry_strs, (ptr1 * (ENT_STR_SIZE+1)), lenk1, uch1, ucap); @@ -3180,7 +3180,7 @@ BEGIN BEGIN printf("1there is a error: U_ZERO_ERROR"); END - tarlen = ucnv_toUChars(ucon1, target, tarcap, &buf[bf_ptr], len, &err1); + tarlen = ucnv_toUChars(ucon1, target, tarcap, (char *)&buf[bf_ptr], len, &err1); if (!U_SUCCESS(err1)) BEGIN printf("2there is a error: U_ZERO_ERROR"); @@ -3243,7 +3243,7 @@ BEGIN BEGIN printf("5there is a error: U_ZERO_ERROR"); END - tblen=ucnv_fromUChars(ucon2, dest, destcap, src, srclen, &err2); + tblen=ucnv_fromUChars(ucon2, (char *)dest, destcap, src, srclen, &err2); if (!U_SUCCESS(err2)) BEGIN printf("6there is a error: U_ZERO_ERROR"); diff --git a/Build/source/texk/bibtexu/bibtex-3.c b/Build/source/texk/bibtexu/bibtex-3.c index b1d6cd01f0c..6d89553e062 100644 --- a/Build/source/texk/bibtexu/bibtex-3.c +++ b/Build/source/texk/bibtexu/bibtex-3.c @@ -388,7 +388,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/bibtexu/datatype.h b/Build/source/texk/bibtexu/datatype.h index 3fe9d9b4a0d..5367ee78e42 100644 --- a/Build/source/texk/bibtexu/datatype.h +++ b/Build/source/texk/bibtexu/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/bibtexu/utils.c b/Build/source/texk/bibtexu/utils.c index 6d27809fefa..ee272b211da 100644 --- a/Build/source/texk/bibtexu/utils.c +++ b/Build/source/texk/bibtexu/utils.c @@ -1794,11 +1794,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); |