[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] tools/kdd: use mute -Warray-bounds only on new gcc version
At 00:39 +0200 on 07 Apr (1523061555), Marek Marczykowski-Górecki wrote: > On Fri, Apr 06, 2018 at 06:12:50PM +0100, Wei Liu wrote: > > On Fri, Apr 06, 2018 at 05:32:57PM +0200, Marek Marczykowski-Górecki wrote: > > Oh thanks for the quick turnaround. > > > > Since Tim thinks it is better to not disable the warning -- how about > > using assert() to give the compiler a hint? Would that work? > > No, it doesn't. > > Changing offset type to uint32_t, or unsigned int works. Also adding > "offset &= 0x2ff" helps (but changes behavior). And now I wonder if > this warning isn't legitimate - maybe there is some int overflow case > that I don't see? Huh. I don't see an overflow - if anything, having offset be 64bit should make it safer. But having offset be uint32_t should be fine too, so if it makes gcc happy, that's fine. Cheers, Tim. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |