From: George Koehler Date: Mon, 16 Jan 2017 23:09:55 +0000 (-0500) Subject: Remove some obsolete code that causes a gcc warning. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e97116c0370426dc3568230df1e31d76a69ed39f;p=ack.git Remove some obsolete code that causes a gcc warning. 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. --- diff --git a/mach/proto/as/comm6.c b/mach/proto/as/comm6.c index 9cb943cba..fdbeb77ff 100644 --- a/mach/proto/as/comm6.c +++ b/mach/proto/as/comm6.c @@ -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); }