diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-09-17 10:14:17 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-09-17 10:14:17 -0400 |
commit | f3f8b82d0c396ca8058299565edf7edee5200187 (patch) | |
tree | 208350275f882761640029bf99c4d61cc2bddd32 /test_bits.c | |
parent | 978b7afe869dee677cc37538db1eec0d2fe94fe0 (diff) | |
download | gpsd-f3f8b82d0c396ca8058299565edf7edee5200187.tar.gz |
cppcheck cleanup.
Diffstat (limited to 'test_bits.c')
-rw-r--r-- | test_bits.c | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/test_bits.c b/test_bits.c index 9644055b..23761878 100644 --- a/test_bits.c +++ b/test_bits.c @@ -148,36 +148,6 @@ int main(int argc, char *argv[]) sb2 = getsb(buf, 8); ub1 = getub(buf, 0); ub2 = getub(buf, 8); - - sw1 = getbes16(buf, 0); - sw2 = getbes16(buf, 8); - uw1 = getbeu16(buf, 0); - uw2 = getbeu16(buf, 8); - sl1 = getbes32(buf, 0); - sl2 = getbes32(buf, 8); - ul1 = getbeu32(buf, 0); - ul2 = getbeu32(buf, 8); - sL1 = getbes64(buf, 0); - sL2 = getbes64(buf, 8); - uL1 = getbeu64(buf, 0); - uL2 = getbeu64(buf, 8); - f1 = getbef32((const char *)buf, 24); - d1 = getbed64((const char *)buf, 16); - - sw1 = getles16(buf, 0); - sw2 = getles16(buf, 8); - uw1 = getleu16(buf, 0); - uw2 = getleu16(buf, 8); - sl1 = getles32(buf, 0); - sl2 = getles32(buf, 8); - ul1 = getleu32(buf, 0); - ul2 = getleu32(buf, 8); - sL1 = getles64(buf, 0); - sL2 = getles64(buf, 8); - uL1 = getleu64(buf, 0); - uL2 = getleu64(buf, 8); - f1 = getlef32((const char *)buf, 24); - d1 = getled64((const char *)buf, 16); /*@+type@*/ if (!quiet) { @@ -188,10 +158,42 @@ int main(int argc, char *argv[]) /* big-endian test */ printf("Big-endian:\n"); + /*@-type@*/ + sw1 = getbes16(buf, 0); + sw2 = getbes16(buf, 8); + uw1 = getbeu16(buf, 0); + uw2 = getbeu16(buf, 8); + sl1 = getbes32(buf, 0); + sl2 = getbes32(buf, 8); + ul1 = getbeu32(buf, 0); + ul2 = getbeu32(buf, 8); + sL1 = getbes64(buf, 0); + sL2 = getbes64(buf, 8); + uL1 = getbeu64(buf, 0); + uL2 = getbeu64(buf, 8); + f1 = getbef32((const char *)buf, 24); + d1 = getbed64((const char *)buf, 16); + /*@+type@*/ bedumpall(); /* little-endian test */ printf("Little-endian:\n"); + /*@-type@*/ + sw1 = getles16(buf, 0); + sw2 = getles16(buf, 8); + uw1 = getleu16(buf, 0); + uw2 = getleu16(buf, 8); + sl1 = getles32(buf, 0); + sl2 = getles32(buf, 8); + ul1 = getleu32(buf, 0); + ul2 = getleu32(buf, 8); + sL1 = getles64(buf, 0); + sL2 = getles64(buf, 8); + uL1 = getleu64(buf, 0); + uL2 = getleu64(buf, 8); + f1 = getlef32((const char *)buf, 24); + d1 = getled64((const char *)buf, 16); + /*@+type@*/ ledumpall(); } |