mirror of
https://github.com/tstack/lnav
synced 2024-11-01 21:40:34 +00:00
Turn on 'sign-compare' error check for tests.
This commit is contained in:
parent
b1a2a88d98
commit
bfee33b7fd
@ -92,7 +92,7 @@ retry:
|
||||
state.push_back(index);
|
||||
}
|
||||
|
||||
return this->sm_count == state.size();
|
||||
return (size_t)this->sm_count == state.size();
|
||||
};
|
||||
|
||||
private:
|
||||
|
@ -15,6 +15,7 @@ simple-db.db: simple-db.sql
|
||||
$(DBGEN_V)$(SQLITE3_CMD) $@ < $(srcdir)/simple-db.sql
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-Werror=sign-compare \
|
||||
-I$(top_srcdir)/src \
|
||||
$(READLINE_CFLAGS) \
|
||||
$(SQLITE3_CFLAGS)
|
||||
|
@ -135,7 +135,7 @@ int main(int argc, char *argv[])
|
||||
while (lb.read_line(offset, lv)) {
|
||||
lv.terminate();
|
||||
printf("%s", lv.lv_start);
|
||||
if ((last_offset + lv.lv_len) < offset)
|
||||
if ((off_t)(last_offset + lv.lv_len) < offset)
|
||||
printf("\n");
|
||||
last_offset = offset;
|
||||
}
|
||||
@ -155,7 +155,7 @@ int main(int argc, char *argv[])
|
||||
while (lb.read_line(seq_offset, lv)) { }
|
||||
do {
|
||||
bool ret;
|
||||
int lpc;
|
||||
size_t lpc;
|
||||
|
||||
random_shuffle(index.begin(), index.end());
|
||||
for (lpc = 0; lpc < index.size(); lpc++) {
|
||||
|
@ -213,7 +213,7 @@ static char *hex2bits(const char *src)
|
||||
len = strlen(src) / 2;
|
||||
retval = new char[sizeof(uint32_t) + len];
|
||||
*((uint32_t *)retval) = len;
|
||||
while (pos < (sizeof(uint32_t) + len)) {
|
||||
while ((size_t)pos < (sizeof(uint32_t) + len)) {
|
||||
int val;
|
||||
|
||||
sscanf(src, "%2x", &val);
|
||||
|
@ -52,7 +52,7 @@ static void single_line(const char *data, int lendiff)
|
||||
lb.set_fd(pi[0]);
|
||||
ret = lb.read_line(off, lv);
|
||||
assert(ret);
|
||||
assert(off == strlen(data));
|
||||
assert(off == (off_t)strlen(data));
|
||||
assert(lv.lv_len == strlen(data) - lendiff);
|
||||
|
||||
ret = lb.read_line(off, lv);
|
||||
|
Loading…
Reference in New Issue
Block a user