fix most sign and variable initialization warnings
Change-Id: I56e08db791152a9c95fc0d16bc75b702e403274d
diff --git a/findutils/grep.c b/findutils/grep.c
index f14d6e6..78be704 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -337,7 +337,7 @@
#endif
) {
llist_t *pattern_ptr = pattern_head;
- grep_list_data_t *gl = gl; /* for gcc */
+ static grep_list_data_t *gl;
linenum++;
found = 0;
@@ -650,7 +650,7 @@
lines_before = 0;
lines_after = 0;
} else if (lines_before > 0) {
- if (lines_before > INT_MAX / sizeof(long long))
+ if ((unsigned) lines_before > (unsigned) (INT_MAX / sizeof(long long)))
lines_before = INT_MAX / sizeof(long long);
/* overflow in (lines_before * sizeof(x)) is prevented (above) */
before_buf = xzalloc(lines_before * sizeof(before_buf[0]));