Re: [PATCH v2 5/5] parse-options: detect mismatches in integer signedness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Steinhardt <ps@xxxxxx> writes:

> Address the systemic issue by introducing two new build asserts
> `BARF_UNLESS_SIGNED()` and `BARF_UNLESS_UNSIGNED()`. As the names
> already hint at, those macros will cause a compiler error when passed a
> value that is not signed or unsigned, respectively.
>
> Adapt `OPT_INTEGER()`, `OPT_UNSIGNED()` as well as `OPT_MAGNITUDE()` to
> use those asserts. This uncovers a small set of sites where we indeed
> have the same bug as in git-backfill(1). Adapt all of them to use the
> correct option.

Nicely described and implemented.

Thanks.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux