Skip to content

Commit 732bee6

Browse files
committed
Fix compilation warnings related to changes in the 'hdr_t' type #36
1 parent c635242 commit 732bee6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/script_helpers.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,9 @@ varnish_get_header_command(
484484
if (is_valid_http_where(ctx, he)) {
485485
char buffer[strlen(name) + 3];
486486
sprintf(buffer, "%c%s:", (char) (strlen(name) + 1), name);
487-
const struct gethdr_s hs = {he, buffer};
487+
hdr_t hdr;
488+
CAST_HDR(hdr, buffer);
489+
const struct gethdr_s hs = {he, hdr};
488490
result = VRT_GetHdr(ctx, &hs);
489491
} else {
490492
*error = WS_Printf(
@@ -520,7 +522,9 @@ varnish_set_header_command(
520522
if (is_valid_http_where(ctx, he)) {
521523
char buffer[strlen(name) + 3];
522524
sprintf(buffer, "%c%s:", (char) (strlen(name) + 1), name);
523-
const struct gethdr_s hs = {he, buffer};
525+
hdr_t hdr;
526+
CAST_HDR(hdr, buffer);
527+
const struct gethdr_s hs = {he, hdr};
524528
VRT_SetHdr(
525529
ctx,
526530
&hs,

0 commit comments

Comments
 (0)