You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Greg Stein <gs...@lyra.org> on 2003/01/09 23:37:06 UTC

Re: cvs commit: apr-iconv/ces _tbl_simple.c

On Thu, Jan 09, 2003 at 10:10:11PM -0000, brane@apache.org wrote:
> 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.

Comments in the code, rather than the CVS log message, might be nice. Two
years from now, when somebody goes to toss the casts, they might not find
the CVS log...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: cvs commit: apr-iconv/ces _tbl_simple.c

Posted by Branko Čibej <br...@xbc.nu>.
Greg Stein wrote:

>On Thu, Jan 09, 2003 at 10:10:11PM -0000, brane@apache.org wrote:
>  
>
>>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.
>>    
>>
>
>Comments in the code, rather than the CVS log message, might be nice. Two
>years from now, when somebody goes to toss the casts, they might not find
>the CVS log...
>  
>
How right you are. I've been up to my ears in apr-iconv these past
couple of weeks, and tend to forget that others might be interested in
understanding the code, too...

Sorry about that, will fix ASAP.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/