From e97116c0370426dc3568230df1e31d76a69ed39f Mon Sep 17 00:00:00 2001 From: George Koehler Date: Mon, 16 Jan 2017 18:09:55 -0500 Subject: [PATCH] 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. --- mach/proto/as/comm6.c | 2 -- 1 file changed, 2 deletions(-) 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); } -- 2.34.1