# # # patch "ChangeLog" # from [efbf94c16fa38b15b54b5747a165e5771d7a7916] # to [0c48886f81770cff6961874a216aea9a870e03b4] # # patch "annotate.cc" # from [16ae5adced4f7fa7bf02c2329e79ad5ca0bf775f] # to [a275b753f2a4bc209825371eae5c6b17eebc233d] # # patch "paths.cc" # from [5862b10a890a78c64c21e4c84e10acdab5a9cc70] # to [548609dee53e3a5f45191ff2debfab932a6864be] # # patch "tests/t_database_check.at" # from [332a5aec62e318573ab12e222b0cd31e56951b97] # to [81f66e97321a631d0a5e3e089d1f25dc57d80aa9] # # patch "tests/t_rosterify_attrs.at" # from [88fd7f98291a9643be05646f9d3a16d8c7966cb3] # to [8cbfbe3e77406349916b0f1dfb13d3a9b8683b94] # # patch "tests/t_rosterify_rename.at" # from [75128f084885c91ad3b4ad363dabe3358b89cdf8] # to [c7442cf1ceef0d2ddcfc6bc098e86d6a30b40193] # # patch "testsuite.at" # from [e841783ab39f59232368e9acbb93317bd2274b60] # to [c955055c30725c6d3510bcb9430ec3a5177ed963] # # patch "xdelta.cc" # from [c71201cbb734ac9f92ac4d9cef4cfc53ea20f473] # to [28477206bd84b21ecc8cff135ffd3dbe19e2c84b] # ============================================================ --- ChangeLog efbf94c16fa38b15b54b5747a165e5771d7a7916 +++ ChangeLog 0c48886f81770cff6961874a216aea9a870e03b4 @@ -1,3 +1,14 @@ +2006-03-12 Matthew Gregan + + * paths.cc, annotate.cc, xdelta.cc: Fix the signed vs unsigned + warnings which have obvious solutions. + + * testsuite.at: Remove eval in UNB64_COMMAND and UNGZ_COMMAND; it + breaks testsuite tracing. + + * tests/t_database_check.at, tests/t_rosterify_attrs.at, + tests/t_rosterify_rename.at: Use POSIX syntax for tail. + 2006-03-11 Matthew Gregan * m4/prog_cxx_warnings.m4: Turn on extra warnings (-W) when using ============================================================ --- annotate.cc 16ae5adced4f7fa7bf02c2329e79ad5ca0bf775f +++ annotate.cc a275b753f2a4bc209825371eae5c6b17eebc233d @@ -220,7 +220,7 @@ std::set::const_iterator i; for (i = credit_lines.begin(); i != credit_lines.end(); i++) { - I(*i >= 0 && *i < annotations.size()); + I(*i < annotations.size()); if (annotations[*i] == nullid) { //L(FL("evaluate setting annotations[%d] -> %s, since touched_lines contained %d, copied_lines didn't and annotations[%d] was nullid\n") // % *i % rev % *i % *i); ============================================================ --- paths.cc 5862b10a890a78c64c21e4c84e10acdab5a9cc70 +++ paths.cc 548609dee53e3a5f45191ff2debfab932a6864be @@ -294,7 +294,7 @@ while (1) { stop = s.find('/', start); - if (stop < 0 || stop > s.length()) + if (stop == std::string::npos) { sp.push_back(s.substr(start)); break; ============================================================ --- tests/t_database_check.at 332a5aec62e318573ab12e222b0cd31e56951b97 +++ tests/t_database_check.at 81f66e97321a631d0a5e3e089d1f25dc57d80aa9 @@ -20,7 +20,7 @@ AT_CHECK(MONOTONE add file1, [], [ignore], [ignore]) AT_CHECK(MONOTONE commit --branch=test --message='add file1', [], [ignore], [ignore]) REV1=`BASE_REVISION` -ROST1=`monotone --norc db execute "select id from rosters"| tail -1` +ROST1=`monotone --norc db execute "select id from rosters" | tail -n 1` AT_CHECK(MONOTONE add file2, [], [ignore], [ignore]) AT_CHECK(MONOTONE commit --branch=test --message='add file2', [], [ignore], [ignore]) ============================================================ --- tests/t_rosterify_attrs.at 88fd7f98291a9643be05646f9d3a16d8c7966cb3 +++ tests/t_rosterify_attrs.at 8cbfbe3e77406349916b0f1dfb13d3a9b8683b94 @@ -134,6 +134,6 @@ attr "mtn:execute" "yes" ]) AT_CHECK(cp -f second_manifest_good expout) -CHECK_SAME_CANONICALISED_STDOUT(cat expout, MONOTONE automate select i: | monotone automate toposort address@hidden | tail -1 | monotone automate get_manifest_of address@hidden) +CHECK_SAME_CANONICALISED_STDOUT(cat expout, MONOTONE automate select i: | monotone automate toposort address@hidden | tail -n 1 | monotone automate get_manifest_of address@hidden) AT_CLEANUP ============================================================ --- tests/t_rosterify_rename.at 75128f084885c91ad3b4ad363dabe3358b89cdf8 +++ tests/t_rosterify_rename.at c7442cf1ceef0d2ddcfc6bc098e86d6a30b40193 @@ -92,6 +92,6 @@ to "testfile_end" ]) -CHECK_SAME_CANONICALISED_STDOUT(cat expout, MONOTONE automate select i: | monotone automate toposort address@hidden | tail -1 | monotone automate get_revision address@hidden) +CHECK_SAME_CANONICALISED_STDOUT(cat expout, MONOTONE automate select i: | monotone automate toposort address@hidden | tail -n 1 | monotone automate get_revision address@hidden) AT_CLEANUP ============================================================ --- testsuite.at e841783ab39f59232368e9acbb93317bd2274b60 +++ testsuite.at c955055c30725c6d3510bcb9430ec3a5177ed963 @@ -288,7 +288,7 @@ if test "$OSTYPE" = "msys"; then mimencode -u -o $2 $1 else - eval $UNB64_COMMAND <$1 >$2 + $UNB64_COMMAND <$1 >$2 fi )]) @@ -314,7 +314,7 @@ fi gunzip $2.gz else - eval $UNGZ_COMMAND <$1 >$2 + $UNGZ_COMMAND <$1 >$2 fi )]) ============================================================ --- xdelta.cc c71201cbb734ac9f92ac4d9cef4cfc53ea20f473 +++ xdelta.cc 28477206bd84b21ecc8cff135ffd3dbe19e2c84b @@ -215,7 +215,6 @@ I(apos + alen <= a.size()); I(alen == 1); I(alen < blocksz); - I(lo >= 0); I(lo < b.size()); insert_insn(delta, b[lo]); } @@ -223,7 +222,6 @@ string::size_type next = lo; for (; next < lo + badvance; ++next) { - I(next >= 0); I(next < b.size()); rolling.out(static_cast(b[next])); if (next + blocksz < b.size()) @@ -444,7 +442,6 @@ void append(string & targ, piece_id p, piece_pos pp, length ln) { - I(p >= 0); I(p < pieces.size()); targ.append(pieces[p], pp, ln); }