]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Cleaner way to set the mask for -Wunused-component
authorDale Weiler <weilercdale@gmail.com>
Thu, 24 Nov 2016 19:54:17 +0000 (19:54 +0000)
committerDale Weiler <weilercdale@gmail.com>
Thu, 24 Nov 2016 19:54:17 +0000 (19:54 +0000)
ir.cpp

diff --git a/ir.cpp b/ir.cpp
index f5bc4520147f3765be59b31738056d308ec91535..6f06bdf95e23312cb1a52cddacd99ecf8e2bc161 100644 (file)
--- a/ir.cpp
+++ b/ir.cpp
@@ -638,7 +638,7 @@ bool ir_function_finalize(ir_function *self)
             // claiming it's unused, otherwise skip the vector entierly
             if (v->m_vtype == TYPE_VECTOR)
             {
-                size_t mask = (1 << 0) | (1 << 1) | (1 << 2), bits = 0;
+                size_t mask = (1 << 3) - 1, bits = 0;
                 for (size_t i = 0; i < 3; i++)
                     if (!v->m_members[i] || (v->m_members[i]->m_reads.empty()
                         && v->m_members[i]->m_writes.size()))