Skip to content

Commit

Permalink
Eliminate 'different const qualifiers' MSVC warning in CORD_cat
Browse files Browse the repository at this point in the history
(fix of commit da7ebf4)

* cord/cordbscs.c (CORD_cat_char_star, CORD_cat): Cast
&result->data.concat.right to void* again (to cast away const
qualifier).
  • Loading branch information
ivmai committed Apr 16, 2024
1 parent 696690d commit f0699e3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cord/cordbscs.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ CORD CORD_cat_char_star(CORD x, const char * y, size_t leny)
result -> generic.left_len = (unsigned char)lenx;
result -> generic.len = (unsigned long)result_len;
result -> data.concat.left = x;
GC_PTR_STORE_AND_DIRTY(&(result -> data.concat.right), y);
GC_PTR_STORE_AND_DIRTY(
(/* no const */ void *)&(result -> data.concat.right), y);
GC_reachable_here(x);
if (depth >= CORD_MAX_DEPTH) {
return CORD_balance((CORD)result);
Expand Down Expand Up @@ -278,7 +279,8 @@ CORD CORD_cat(CORD x, CORD y)
result -> generic.left_len = (unsigned char)lenx;
result -> generic.len = (unsigned long)result_len;
result -> data.concat.left = x;
GC_PTR_STORE_AND_DIRTY(&(result -> data.concat.right), y);
GC_PTR_STORE_AND_DIRTY(
(/* no const */ void *)&(result -> data.concat.right), y);
GC_reachable_here(x);
if (depth >= CORD_MAX_DEPTH) {
return CORD_balance((CORD)result);
Expand Down

0 comments on commit f0699e3

Please sign in to comment.