all repos — cgit @ 12d3d4c3edfcf177c56ca97e5a4b0c8301ca46aa

a hyperfast web frontend for git written in c

Avoid signed bitfields

Bitfields are only defined for unsigned types.

Detected by sparse.

Signed-off-by: John Keeping <john@keeping.me.uk>
John Keeping john@keeping.me.uk
Sun, 08 Mar 2015 16:32:17 +0000
commit

12d3d4c3edfcf177c56ca97e5a4b0c8301ca46aa

parent

e3d3fffdd447cdb4551549faae65bae5353a2cab

2 files changed, 3 insertions(+), 3 deletions(-)

jump to
M ui-blob.cui-blob.c

@@ -14,8 +14,8 @@

struct walk_tree_context { const char *match_path; unsigned char *matched_sha1; - int found_path:1; - int file_only:1; + unsigned int found_path:1; + unsigned int file_only:1; }; static int walk_tree(const unsigned char *sha1, struct strbuf *base,
M ui-diff.cui-diff.c

@@ -31,7 +31,7 @@ unsigned int added;

unsigned int removed; unsigned long old_size; unsigned long new_size; - int binary:1; + unsigned int binary:1; } *items; static int use_ssdiff = 0;