]> granicus.if.org Git - apache/commitdiff
mod_brotli: Explicitly cast 'const uint8_t *' to 'const char *' when using
authorEvgeny Kotkov <kotkov@apache.org>
Mon, 28 Nov 2016 18:40:23 +0000 (18:40 +0000)
committerEvgeny Kotkov <kotkov@apache.org>
Mon, 28 Nov 2016 18:40:23 +0000 (18:40 +0000)
the data received from Brotli to create a bucket.

This fixes a /W4 warning in my environment, and should also allow building
mod_brotli on NetWare.

Submitted by: NormW <normw gknw.net>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1771791 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_brotli.c

index f8a0a2c487a95e2ce9c956b649c3f3dd12943b85..bea3ec7dd8db3cee38fe43c69ec237d23b73e79f 100644 (file)
@@ -240,7 +240,7 @@ static apr_status_t process_chunk(brotli_ctx_t *ctx,
             output = BrotliEncoderTakeOutput(ctx->state, &output_len);
             ctx->total_out += output_len;
 
-            b = apr_bucket_transient_create(output, output_len,
+            b = apr_bucket_transient_create((const char *)output, output_len,
                                             ctx->bb->bucket_alloc);
             APR_BRIGADE_INSERT_TAIL(ctx->bb, b);
 
@@ -289,7 +289,7 @@ static apr_status_t flush(brotli_ctx_t *ctx,
         output = BrotliEncoderTakeOutput(ctx->state, &output_len);
         ctx->total_out += output_len;
 
-        b = apr_bucket_heap_create(output, output_len, NULL,
+        b = apr_bucket_heap_create((const char *)output, output_len, NULL,
                                    ctx->bb->bucket_alloc);
         APR_BRIGADE_INSERT_TAIL(ctx->bb, b);
     }