Mercurial > hg
changeset 47976:2018753014be
dirstate: fix compilation warnings in `dirstate_item_set_possibly_dirty()`
Since https://phab.mercurial-scm.org/D11387 (i.e. the same patch as
mentioned in my previous patch), Clang has also started warning about
`dirstate_item_set_possibly_dirty()` missing an explicit return, and
about its use of the result of an assignment as a condition without
using parentheses. This patch fixes that.
Differential Revision: https://phab.mercurial-scm.org/D11445
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 16 Sep 2021 16:42:16 -0700 |
parents | ec178161a8d1 |
children | d1d9510f73f0 |
files | mercurial/cext/parsers.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cext/parsers.c Thu Sep 16 16:29:55 2021 -0700 +++ b/mercurial/cext/parsers.c Thu Sep 16 16:42:16 2021 -0700 @@ -488,9 +488,8 @@ to make sure it is correct. */ static PyObject *dirstate_item_set_possibly_dirty(dirstateItemObject *self) { - if (self->flags |= dirstate_flag_possibly_dirty) { - Py_RETURN_NONE; - } + self->flags |= dirstate_flag_possibly_dirty; + Py_RETURN_NONE; } /* See docstring of the python implementation for details */