[PATCH] Enforce type check in ARRAY_SIZE macro

Ken Thomases ken at codeweavers.com
Sat Jul 7 11:15:48 CDT 2018


On Jul 7, 2018, at 8:15 AM, MichaƂ Janiszewski <janisozaur at gmail.com> wrote:
> 
> On 7 July 2018 at 02:03, Ken Thomases <ken at codeweavers.com <mailto:ken at codeweavers.com>> wrote:
> On Jul 6, 2018, at 5:25 PM, janisozaur at gmail.com <mailto:janisozaur at gmail.com> wrote:
>> 
>> +#else
> 
>> +#define __must_be_array(a) 0
>> +#endif
>> +
>> +# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + __must_be_array(x)
> 
> The " + __must_be_array(x)" should be inside the parentheses.
> 
> Indeed. How do I send "v2" patch?

If you use git-send-email, you can add the "-v2" option to change the subject prefix from "PATCH" to "PATCH v2".  It's generally a good idea to add a note explaining what changed from previous versions.  You can use the --annotate option to give you a chance to edit the message before sending it.  You would add a note below the "---" line with an explanation of the change from the previous version.  (There's also the "notes" feature of git for maintaining such explanations, but it's kind of finicky.  See "man git-notes".)

-Ken

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20180707/01bccb5d/attachment-0001.html>


More information about the wine-devel mailing list