From 02586128153fb3b7216345b02fa6ed3e0b1fe023 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 14 Feb 2017 19:17:45 +0100 Subject: [PATCH] sanitize: use 1u (unsigned) for flag bit shifts Fixes #175 --- opts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opts.c b/opts.c index e50bd74..b880ac2 100644 --- a/opts.c +++ b/opts.c @@ -170,9 +170,9 @@ void opts_set(uint32_t *flags, size_t idx, bool on) { LONGBIT_SET(lb, idx); if (on) - flags[lb.idx] |= (1<<(lb.bit)); + flags[lb.idx] |= (1u<<(lb.bit)); else - flags[lb.idx] &= ~(1<<(lb.bit)); + flags[lb.idx] &= ~(1u<<(lb.bit)); } void opts_setoptimlevel(unsigned int level) { -- 2.39.2