martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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. I don't know if `return
  NULL` was the intent.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11445

AFFECTED FILES
  mercurial/cext/parsers.c

CHANGE DETAILS

diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -487,9 +487,11 @@
    to make sure it is correct. */
 static PyObject *dirstate_item_set_possibly_dirty(dirstateItemObject *self)
 {
-       if (self->flags |= dirstate_flag_possibly_dirty) {
+       self->flags |= dirstate_flag_possibly_dirty;
+       if (self->flags) {
                Py_RETURN_NONE;
        }
+       return NULL;
 }
 
 /* See docstring of the python implementation for details */



To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to