git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix code issues spotted by clang
@ 2011-11-06 12:06 Ævar Arnfjörð Bjarmason
  2011-11-06 12:06 ` [PATCH 1/3] apply: get rid of useless x < 0 comparison on a size_t type Ævar Arnfjörð Bjarmason
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2011-11-06 12:06 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jim Meyering, Fredrik Gustafsson,
	Ævar Arnfjörð Bjarmason

This series fixes some of the code issues raised by clang. This leaves
the following warnings that I haven't addressed:

    revision.c:766:25: warning: implicit truncation from 'unsigned int' to bitfield changes value from 4294967279 to 134217711
          [-Wconstant-conversion]
                    p->item->object.flags &= ~TMP_MARK;
                                          ^  ~~~~~~~~~
    revision.c:768:25: warning: implicit truncation from 'unsigned int' to bitfield changes value from 4294967279 to 134217711
          [-Wconstant-conversion]
                    p->item->object.flags &= ~TMP_MARK;
                                          ^  ~~~~~~~~~
    revision.c:1875:25: warning: implicit truncation from 'unsigned int' to bitfield changes value from 4294967279 to 134217711
          [-Wconstant-conversion]
                    p->item->object.flags &= ~TMP_MARK;
                                          ^  ~~~~~~~~~
    revision.c:2202:25: warning: implicit truncation from 'unsigned int' to bitfield changes value from 4294967158 to 134217590
          [-Wconstant-conversion]
                            commit->object.flags &= ~(ADDED | SEEN | SHOWN);
                                                 ^  ~~~~~~~~~~~~~~~~~~~~~~~
    upload-pack.c:115:12: warning: implicit truncation from 'unsigned int' to bitfield changes value from 4294967293 to 134217725
          [-Wconstant-conversion]
                    o->flags &= ~UNINTERESTING;
                             ^  ~~~~~~~~~~~~~~
    upload-pack.c:689:19: warning: implicit truncation from 'unsigned int' to bitfield changes value from 4294705151 to 133955583
          [-Wconstant-conversion]
                                    object->flags &= ~CLIENT_SHALLOW;
                                                  ^  ~~~~~~~~~~~~~~~
    builtin/checkout.c:676:16: warning: implicit truncation from 'unsigned int' to bitfield changes value from 4294967293 to 134217725
          [-Wconstant-conversion]
            object->flags &= ~UNINTERESTING;
                          ^  ~~~~~~~~~~~~~~
    builtin/reflog.c:173:32: warning: implicit truncation from 'unsigned int' to bitfield changes value from 4294965247 to 134215679
          [-Wconstant-conversion]
                    found.objects[i].item->flags &= ~STUDYING;
                                                 ^  ~~~~~~~~~
    builtin/reflog.c:232:31: warning: implicit truncation from 'unsigned int' to bitfield changes value from 4294963199 to 134213631
          [-Wconstant-conversion]
                    pending->item->object.flags &= ~REACHABLE;
                                                ^  ~~~~~~~~~~
    bisect.c:66:24: warning: implicit truncation from 'unsigned int' to bitfield changes value from 4294901759 to 134152191
          [-Wconstant-conversion]
                    commit->object.flags &= ~COUNTED;
                                         ^  ~~~~~~~~
    
Ævar Arnfjörð Bjarmason (3):
  apply: get rid of useless x < 0 comparison on a size_t type
  diff/apply: cast variable in call to free()
  grep: get rid of useless x < 0 comparison on an enum member

 builtin/apply.c |    3 ---
 builtin/diff.c  |    2 +-
 grep.c          |    2 +-
 submodule.c     |    2 +-
 4 files changed, 3 insertions(+), 6 deletions(-)

-- 
1.7.6.3

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2011-11-08 16:06 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-06 12:06 [PATCH 0/3] Fix code issues spotted by clang Ævar Arnfjörð Bjarmason
2011-11-06 12:06 ` [PATCH 1/3] apply: get rid of useless x < 0 comparison on a size_t type Ævar Arnfjörð Bjarmason
2011-11-06 18:35   ` Junio C Hamano
2011-11-07 19:09     ` Giuseppe Bilotta
2011-11-06 12:06 ` [PATCH 2/3] diff/apply: cast variable in call to free() Ævar Arnfjörð Bjarmason
2011-11-06 12:06 ` [PATCH 3/3] grep: get rid of useless x < 0 comparison on an enum member Ævar Arnfjörð Bjarmason
2011-11-06 15:03   ` Andreas Schwab
2011-11-07 12:42     ` Ævar Arnfjörð Bjarmason
2011-11-07 13:12       ` Andreas Schwab
2011-11-07 16:38         ` Jeff King
2011-11-07 18:24           ` Andreas Schwab
2011-11-07 18:34             ` Jeff King
2011-11-07 18:55               ` Jeff King
2011-11-07 19:06                 ` Ævar Arnfjörð Bjarmason
2011-11-07 20:13                 ` Andreas Schwab
2011-11-07 19:49   ` Jonathan Nieder
2011-11-07 21:18     ` Junio C Hamano
2011-11-07 21:32       ` Jonathan Nieder
2011-11-07 21:48         ` Junio C Hamano
2011-11-07 22:21           ` Jonathan Nieder
2011-11-06 12:33 ` [PATCH 0/3] Fix code issues spotted by clang Ævar Arnfjörð Bjarmason
2011-11-08 16:05   ` Elijah Newren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).