From 5ae12a19d01500b8307e11d18ab31f42b697e99b Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Mon, 21 Nov 2016 20:49:45 +0100 Subject: [PATCH] gcc/ck_pr: Try to make sure the compiler isn't unhappy about constness. --- include/gcc/ck_pr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/gcc/ck_pr.h b/include/gcc/ck_pr.h index c303ad7..7448997 100644 --- a/include/gcc/ck_pr.h +++ b/include/gcc/ck_pr.h @@ -61,7 +61,7 @@ ck_pr_barrier(void) { \ T r; \ ck_pr_barrier(); \ - r = CK_PR_ACCESS(*(T *)target); \ + r = CK_PR_ACCESS(*(const T *)target); \ ck_pr_barrier(); \ return (r); \ } \ @@ -80,7 +80,7 @@ ck_pr_md_load_ptr(const void *target) void *r; ck_pr_barrier(); - r = CK_PR_ACCESS(*(void **)target); + r = CK_CC_DECONST_PTR(CK_PR_ACCESS(target)); ck_pr_barrier(); return r; @@ -91,7 +91,7 @@ ck_pr_md_store_ptr(void *target, const void *v) { ck_pr_barrier(); - CK_PR_ACCESS(*(void **)target) = (void *)v; + CK_PR_ACCESS(target) = CK_CC_DECONST_PTR(v); ck_pr_barrier(); return; }