# HG changeset patch # User Rik # Date 1348987200 25200 # Node ID 1cc42df8ede736c9af405bca29028f316eadb24f # Parent dd086145f4a663f3798beb7c103aa197572d3753 mkoctfile.in.cc: Change variable types to stop compilation warnings. * mkoctfile.in.cc: Change variable types to stop compilation warnings about signed/unsigned comparisons. Remove unused variable len. diff -r dd086145f4a6 -r 1cc42df8ede7 src/mkoctfile.in.cc --- a/src/mkoctfile.in.cc Sat Sep 29 23:28:38 2012 -0700 +++ b/src/mkoctfile.in.cc Sat Sep 29 23:40:00 2012 -0700 @@ -73,7 +73,7 @@ get_line (FILE *fp) { static vector buf (100); - int idx = 0; + unsigned int idx = 0; char c; while (true) @@ -436,7 +436,6 @@ for (int i = 1; i < argc; i++) { string arg = argv[i]; - size_t len = arg.length (); if (ends_with (arg, ".c")) { @@ -608,13 +607,13 @@ FILE *fd = popen (cmd.c_str (), "r"); ofstream fo (dfile.c_str ()); - int pos; + size_t pos; while (!feof (fd)) { line = get_line (fd); if ((pos = line.rfind (".o:")) != string::npos) { - int spos = line.rfind ('/', pos); + size_t spos = line.rfind ('/', pos); string ofile = (spos == string::npos ? line.substr (0, pos+2) : line.substr (spos+1, pos-spos+1)); fo << "pic/" << ofile << " " << ofile << " " << dfile << line.substr (pos) << endl; } @@ -636,13 +635,13 @@ FILE *fd = popen (cmd.c_str (), "r"); ofstream fo (dfile.c_str ()); - int pos; + size_t pos; while (!feof (fd)) { line = get_line (fd); if ((pos = line.rfind (".o:")) != string::npos) { - int spos = line.rfind ('/', pos); + size_t spos = line.rfind ('/', pos); string ofile = (spos == string::npos ? line.substr (0, pos+2) : line.substr (spos+1, pos-spos+1)); fo << "pic/" << ofile << " " << ofile << " " << dfile << line.substr (pos+2) << endl; }