changeset 1887:1e5b7843dfa0

[xemacs-hg @ 2004-01-27 17:55:15 by james] Shut up compiler warnings from ICC 8.0 about signed 1-bit fields.
author james
date Tue, 27 Jan 2004 17:55:18 +0000
parents ee0959363838
children 71e9a0048be8
files src/ChangeLog src/unicode.c
diffstat 2 files changed, 20 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Jan 27 17:49:44 2004 +0000
+++ b/src/ChangeLog	Tue Jan 27 17:55:18 2004 +0000
@@ -1,3 +1,13 @@
+2004-01-21  Jerry James  <james@xemacs.org>
+
+	* unicode.c (struct unicode_coding_system): Make one bit fields
+	unsigned.
+	* unicode.c (decode_unicode_char): Ditto.
+	* unicode.c (encode_unicode_char_1): Ditto.
+	* unicode.c (encode_unicode_char): Ditto.
+	* unicode.c (unicode_convert): Ditto.
+	* unicode.c (struct utf_8_detector): Ditto.
+
 2003-11-04  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* frame-x.c (x_wm_hack_wm_protocols):
--- a/src/unicode.c	Tue Jan 27 17:49:44 2004 +0000
+++ b/src/unicode.c	Tue Jan 27 17:55:18 2004 +0000
@@ -1480,8 +1480,8 @@
 struct unicode_coding_system
 {
   enum unicode_type type;
-  int little_endian :1;
-  int need_bom :1;
+  unsigned int little_endian :1;
+  unsigned int need_bom :1;
 };
 
 #define CODING_SYSTEM_UNICODE_TYPE(codesys) \
@@ -1521,7 +1521,8 @@
         Danger, Will Robinson!  Data loss.  Should we signal user? */
 static void
 decode_unicode_char (int ch, unsigned_char_dynarr *dst,
-		     struct unicode_coding_stream *data, int ignore_bom)
+		     struct unicode_coding_stream *data,
+		     unsigned int ignore_bom)
 {
   if (ch == 0xFEFF && !data->seen_char && ignore_bom)
     ;
@@ -1554,7 +1555,7 @@
 
 static void
 encode_unicode_char_1 (int code, unsigned_char_dynarr *dst,
-		       enum unicode_type type, int little_endian)
+		       enum unicode_type type, unsigned int little_endian)
 {
   switch (type)
     {
@@ -1639,7 +1640,7 @@
 static void
 encode_unicode_char (Lisp_Object charset, int h, int l,
 		     unsigned_char_dynarr *dst, enum unicode_type type,
-		     int little_endian)
+		     unsigned int little_endian)
 {
 #ifdef MULE
   int code = ichar_to_unicode (make_ichar (charset, h & 127, l & 127));
@@ -1676,8 +1677,9 @@
   struct unicode_coding_stream *data = CODING_STREAM_TYPE_DATA (str, unicode);
   enum unicode_type type =
     XCODING_SYSTEM_UNICODE_TYPE (str->codesys);
-  int little_endian = XCODING_SYSTEM_UNICODE_LITTLE_ENDIAN (str->codesys);
-  int ignore_bom = XCODING_SYSTEM_UNICODE_NEED_BOM (str->codesys);
+  unsigned int little_endian =
+    XCODING_SYSTEM_UNICODE_LITTLE_ENDIAN (str->codesys);
+  unsigned int ignore_bom = XCODING_SYSTEM_UNICODE_NEED_BOM (str->codesys);
   Bytecount orign = n;
 
   if (str->direction == CODING_DECODE)
@@ -2124,7 +2126,7 @@
   int seen_longer_sequence;
   int seen_iso2022_esc;
   int seen_iso_shift;
-  int seen_utf_bom:1;
+  unsigned int seen_utf_bom:1;
 };
 
 static void