fix -Wsign-compare warnings in lnav_commands.cc

Fixes these warnings:

    lnav_commands.cc: In function ‘std::string remaining_args(const string&, const std::vector<std::basic_string<char> >&, size_t)’:
    lnav_commands.cc:67:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int lpc = 0; lpc < index; lpc++) {
                                 ^
    lnav_commands.cc: In function ‘std::string com_save_to(std::string, std::vector<std::basic_string<char> >&)’:
    lnav_commands.cc:574:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int lpc = 0; lpc < dls.text_line_count(); lpc++) {
pull/379/head
Adam Spiers 8 years ago
parent 961cac8ec0
commit dc500774a8

@ -64,7 +64,7 @@ static string remaining_args(const string &cmdline,
require(index > 0);
for (int lpc = 0; lpc < index; lpc++) {
for (unsigned int lpc = 0; lpc < index; lpc++) {
start_pos += args[lpc].length();
}
@ -571,7 +571,7 @@ static string com_save_to(string cmdline, vector<string> &args)
dos.list_value_for_overlay(lnav_data.ld_views[LNV_DB], vis_line_t(0), header_line);
fputs(header_line.get_string().c_str(), outfile);
fputc('\n', outfile);
for (int lpc = 0; lpc < dls.text_line_count(); lpc++) {
for (unsigned int lpc = 0; lpc < dls.text_line_count(); lpc++) {
string line;
dls.text_value_for_line(lnav_data.ld_views[LNV_DB], lpc, line, true);

Loading…
Cancel
Save