Use the shiny new `mLib' warning-control macros.
[u/mdw/catacomb] / math / mpx.c
index 37a8a4e..5a9a176 100644 (file)
@@ -33,6 +33,7 @@
 #include <string.h>
 
 #include <mLib/bits.h>
 #include <string.h>
 
 #include <mLib/bits.h>
+#include <mLib/macros.h>
 
 #include "mptypes.h"
 #include "mpx.h"
 
 #include "mptypes.h"
 #include "mpx.h"
@@ -661,12 +662,6 @@ done:;
  * Use;                Provides the dyadic boolean functions.
  */
 
  * Use;                Provides the dyadic boolean functions.
  */
 
-/* GCC complains about the generated code, so try to silence it. */
-#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
-#  pragma GCC diagnostic push
-#  pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
-
 #define MPX_BITBINOP(string)                                           \
                                                                        \
 void mpx_bit##string(mpw *dv, mpw *dvl, const mpw *av, const mpw *avl, \
 #define MPX_BITBINOP(string)                                           \
                                                                        \
 void mpx_bit##string(mpw *dv, mpw *dvl, const mpw *av, const mpw *avl, \
@@ -680,15 +675,12 @@ void mpx_bit##string(mpw *dv, mpw *dvl, const mpw *av, const mpw *avl,    \
     a = (av < avl) ? *av++ : 0;                                                \
     b = (bv < bvl) ? *bv++ : 0;                                                \
     *dv++ = B##string(a, b);                                           \
     a = (av < avl) ? *av++ : 0;                                                \
     b = (bv < bvl) ? *bv++ : 0;                                                \
     *dv++ = B##string(a, b);                                           \
+    IGNORE(a); IGNORE(b);                                              \
   }                                                                    \
 }
 
 MPX_DOBIN(MPX_BITBINOP)
 
   }                                                                    \
 }
 
 MPX_DOBIN(MPX_BITBINOP)
 
-#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
-#  pragma GCC diagnostic pop
-#endif
-
 void mpx_not(mpw *dv, mpw *dvl, const mpw *av, const mpw *avl)
 {
   MPX_SHRINK(av, avl);
 void mpx_not(mpw *dv, mpw *dvl, const mpw *av, const mpw *avl)
 {
   MPX_SHRINK(av, avl);