httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: svn commit: r602503 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/http/http_etag.c
Date Mon, 10 Dec 2007 21:23:12 GMT
rpluem@apache.org wrote:
> Author: rpluem
> Date: Sat Dec  8 08:50:12 2007
> New Revision: 602503
> 
> @@ -28,16 +28,16 @@
>  #include "http_protocol.h"   /* For index_of_response().  Grump. */
>  #include "http_request.h"
>  
> -/* Generate the human-readable hex representation of an unsigned long
> - * (basically a faster version of 'sprintf("%lx")')
> +/* Generate the human-readable hex representation of an apr_uint64_t
> + * (basically a faster version of 'sprintf("%llx")')
>   */
>  #define HEX_DIGITS "0123456789abcdef"
> -static char *etag_ulong_to_hex(char *next, unsigned long u)
> +static char *etag_uint64_to_hex(char *next, apr_uint64_t u)
>  {
>      int printing = 0;
> -    int shift = sizeof(unsigned long) * 8 - 4;
> +    int shift = sizeof(apr_uint64_t) * 8 - 4;
>      do {
> -        unsigned long next_digit = ((u >> shift) & (unsigned long)0xf);
> +        unsigned short next_digit = ((u >> shift) & (apr_uint64_t)0xf);

Folks, what's the desire to emit warning messages about our deliberate
(unsigned short) truncation from an unsigned long value?

Mind adding the appropriate cast to quiet the build here on line 40?

Bill

Mime
View raw message