sanitize: shift 1u (unsigned) for flag bits
authorWolfgang Bumiller <wry.git@bumiller.com>
Tue, 14 Feb 2017 18:17:45 +0000 (19:17 +0100)
committerWolfgang Bumiller <wry.git@bumiller.com>
Tue, 14 Feb 2017 18:24:04 +0000 (19:24 +0100)
opts.cpp

index b2517a0..c35fd73 100644 (file)
--- a/opts.cpp
+++ b/opts.cpp
@@ -149,9 +149,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) {