diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-02-25 22:30:39 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-03-13 13:58:45 +0100 |
commit | 6298ff8b6492e2071a8f2ca7669a3aeef0fb29c7 (patch) | |
tree | e2b48e6edada0dbebcfadd14daaa727b1783a982 /methods | |
parent | 67c3067f1a615fd6ff0b332c2a526d052442913d (diff) |
fix -Wformat= warnings about size_t != %lu on e.g. armel
Git-Dch: Ignore
Reported-By: gcc
Diffstat (limited to 'methods')
-rw-r--r-- | methods/rred.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/methods/rred.cc b/methods/rred.cc index fe7ef7322..7169fc731 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -469,7 +469,7 @@ class Patch { void write_diff(FILE *f) { - size_t line = 0; + unsigned long long line = 0; std::list<struct Change>::reverse_iterator ch; for (ch = filechanges.rbegin(); ch != filechanges.rend(); ++ch) { line += ch->offset + ch->del_cnt; @@ -482,11 +482,11 @@ class Patch { line -= ch->del_cnt; if (ch->add_cnt > 0) { if (ch->del_cnt == 0) { - fprintf(f, "%lua\n", line); + fprintf(f, "%llua\n", line); } else if (ch->del_cnt == 1) { - fprintf(f, "%luc\n", line+1); + fprintf(f, "%lluc\n", line+1); } else { - fprintf(f, "%lu,%luc\n", line+1, line+ch->del_cnt); + fprintf(f, "%llu,%lluc\n", line+1, line+ch->del_cnt); } mg_i = ch; @@ -496,9 +496,9 @@ class Patch { fprintf(f, ".\n"); } else if (ch->del_cnt == 1) { - fprintf(f, "%lud\n", line+1); + fprintf(f, "%llud\n", line+1); } else if (ch->del_cnt > 1) { - fprintf(f, "%lu,%lud\n", line+1, line+ch->del_cnt); + fprintf(f, "%llu,%llud\n", line+1, line+ch->del_cnt); } line -= ch->offset; } |