Remove some obsolete code that causes a gcc warning.
authorGeorge Koehler <xkernigh@netscape.net>
Mon, 16 Jan 2017 23:09:55 +0000 (18:09 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Mon, 16 Jan 2017 23:09:55 +0000 (18:09 -0500)
In my OpenBSD/amd64 system, the code becomes

    if (0)
        outname.on_valu &= ~(((0xFFFFFFFF)<<32)<<32);

The 0xFFFFFFFF is a 32-bit int, so the left shift by 32 is out of
range and causes the gcc warning.

The intent might be to clear any sign-extended bits, if the assignment
outname.on_valu = valu did sign extension.  Old C had no unsigned
long, so .on_valu would have been long.  The code is obsolete because
h/out.h now declares .on_valu as uint32_t.

mach/proto/as/comm6.c

index 9cb943c..fdbeb77 100644 (file)
@@ -354,8 +354,6 @@ valu_t valu;
        outname.on_type = type;
        outname.on_desc = desc;
        outname.on_valu = valu;
-       if (sizeof(valu) != sizeof(long))
-               outname.on_valu &= ~(((0xFFFFFFFF)<<(4*sizeof(valu_t)))<<(4*sizeof(valu_t)));
        wr_name(&outname, 1);
 }