From 98f7c88ca916f8c5c66cefce95c7f77f3b4cd3b3 Mon Sep 17 00:00:00 2001 From: JustVugg Date: Thu, 16 Jul 2026 19:50:20 +0200 Subject: [PATCH] numa: parenthesise the page-align arithmetic (#313) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `(uintptr_t)p+n+4095 & ~(uintptr_t)4095` is CORRECT — `+` binds tighter than `&` in C, so the rounding happens before the mask, which is what was meant. But gcc -Wall warns (`suggest parentheses around '+' in operand of '&'`), and this repo builds clean at -Wall -Wextra. Warning-free is a property worth more than the two characters it costs to keep: it is what makes a NEW warning visible instead of scrolling past in a wall of noise. No behaviour change; the emitted code is identical. Co-Authored-By: ZacharyZcR <#313> Co-Authored-By: Claude Opus 4.8 --- c/glm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/glm.c b/c/glm.c index cffd5ec..bda4e7d 100644 --- a/c/glm.c +++ b/c/glm.c @@ -1178,7 +1178,7 @@ static void numa_slab_bind(void *p, size_t n){ if(g_numa_nodes<2 || !p || !n) return; unsigned long mask=(1UL<