From a06bfb74a7210d199fa6ad8782470f7d0754b6fd Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 17 Sep 2018 19:00:42 -0400 Subject: [PATCH] kernel/random: Avoid casting away const in the U8TO32_LITTLE macro This macro is only ever used with const input data within chachaInit(), which causes -Wcast-qual warnings. This is trivial enough to fix, by preserving the qualifier within the cast. --- nx/source/kernel/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx/source/kernel/random.c b/nx/source/kernel/random.c index aa602ca1..af8393c6 100644 --- a/nx/source/kernel/random.c +++ b/nx/source/kernel/random.c @@ -20,7 +20,7 @@ (*(u32*)(p) = (v)) #define U8TO32_LITTLE(p) \ - (*(u32*)(p)) + (*(const u32*)(p)) #define ROTATE(v,c) (ROTL32(v,c)) #define XOR(v,w) ((v) ^ (w))