X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/aaae9cab01b8d7a0e6cf0c273182a51fd03a9d61..ce7001d8ef72928ff966e3c9da1c62ce1d00d2c0:/symm/blkc.h?ds=sidebyside diff --git a/symm/blkc.h b/symm/blkc.h index e0374f1a..ff631f09 100644 --- a/symm/blkc.h +++ b/symm/blkc.h @@ -174,7 +174,7 @@ unsigned _i; BLKC_W(w); unsigned long _x = x; \ for (_i = 0; _i < PRE##_BLKSZ / 4; _i++) { \ *_w++ = U32(_x); \ - _x = ((_x & ~MASK32) >> 16) >> 16; \ + _x = ((_x & ~(unsigned long)MASK32) >> 16) >> 16; \ } \ } while (0) @@ -182,7 +182,7 @@ unsigned _i; BLKC_W(w); unsigned long _x = x; _w += PRE##_BLKSZ / 4; \ for (_i = 0; _i < PRE##_BLKSZ / 4; _i++) { \ *--_w = U32(_x); \ - _x = ((_x & ~MASK32) >> 16) >> 16; \ + _x = ((_x & ~(unsigned long)MASK32) >> 16) >> 16; \ } \ } while (0) @@ -318,12 +318,17 @@ static int pre##_verify(dstr *v) \ return (ok); \ } +#define BLKC_TESTDEFS(PRE, pre) BLKC_TESTDEFSX(PRE, pre, #pre) + +#define BLKC_TESTDEFSX(PRE, pre, name) \ + { name, pre##_verify, { &type_hex, &type_hex, &type_hex, 0 } }, + #define BLKC_TESTX(PRE, pre, name, fname) \ \ BLKC_VERIFYX(PRE, pre, name) \ \ static const test_chunk defs[] = { \ - { name, pre##_verify, { &type_hex, &type_hex, &type_hex, 0 } }, \ + BLKC_TESTDEFSX(PRE, pre, name) \ { 0, 0, { 0 } } \ }; \ \