apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: apr-iconv/ces _tbl_simple.c
Date Thu, 09 Jan 2003 22:10:11 GMT
brane       2003/01/09 14:10:11

  Modified:    ces      _tbl_simple.c
  Log:
  Use a cast to ucs2_t to slence two instances of the following MSVC warning:
  
      warning C4761: integral size mismatch in argument; conversion supplied
  
  In both cases, we know from context that the cast is safe: In the
  first case, the previous statement checks that we're handling a 16-bit
  char; in the second, we're creating one from two bytes.
  
  Revision  Changes    Path
  1.7       +2 -2      apr-iconv/ces/_tbl_simple.c
  
  Index: _tbl_simple.c
  ===================================================================
  RCS file: /home/cvs/apr-iconv/ces/_tbl_simple.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- _tbl_simple.c	2 Dec 2002 22:47:59 -0000	1.6
  +++ _tbl_simple.c	9 Jan 2003 22:10:11 -0000	1.7
  @@ -84,7 +84,7 @@
   		return 1;	/* No state reinitialization for table charsets */
   	if (iconv_char32bit(in))
   		return -1;
  -	res = ICONV_CCS_CONVERT_FROM_UCS(ccsd, in);
  +	res = ICONV_CCS_CONVERT_FROM_UCS(ccsd, (ucs2_t)in);
   	if (res == UCS_CHAR_INVALID)
   		return -1;	/* No character in output charset */
   	bytes = res & 0xFF00 ? 2 : 1;
  @@ -110,7 +110,7 @@
   		return UCS_CHAR_NONE;	/* Not enough bytes in the input buffer */
   	if (bytes == 2)
       		res = ICONV_CCS_CONVERT_TO_UCS(ccsd,
  -		    (byte << 8) | (* ++(*inbuf)));
  +		    (ucs2_t)((byte << 8) | (* ++(*inbuf))));
   	(*inbuf) ++;
   	*inbytesleft -= bytes;
   	return res;
  
  
  

Mime
View raw message