If the search-hit is past the right side of the screen (as mentioned in #394)
we should try to make that more obvious by adding a highlight on the left.
Since 26cd9f59 introduced stricter timestamp parsing so that
the full string now has to be matched, several of the 3rd party
formats installable via "lnav -i extra" broke. So add a couple
more very common timestamp formats to address these.
Fix this warning:
lnav_log.cc: In function ‘void log_host_info()’:
lnav_log.cc:185:29: warning: ignoring return value of ‘char* getcwd(char*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
getcwd(cwd, sizeof(cwd));
^
This is obviously worthwhile, but also eliminates this compiler warning:
lnav.cc: In function ‘int main(int, char**)’:
lnav.cc:2407:33: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system(pull_cmd);
^
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++) {
Fixes this warning:
relative_time.cc: In member function ‘bool relative_time::parse(const char*, size_t, relative_time::parse_error&)’:
relative_time.cc:222:62: warning: format ‘%qd’ expects argument of type ‘long long int*’, but argument 3 has type ‘int64_t* {aka long int*}’ [-Wformat=]
if (sscanf(numstr.c_str(), "%qd", &number) != 1) {
^
Fix these warnings:
papertrail_proc.hh: In constructor ‘papertrail_proc::papertrail_proc(const string&, time_t, time_t)’:
papertrail_proc.hh:107:36: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
this->ptp_api_key);
^
papertrail_proc.hh: In member function ‘void papertrail_proc::set_url()’:
papertrail_proc.hh:146:47: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
this->ptp_quoted_search.in());
Fix these warnings:
papertrail_proc.hh: In constructor ‘papertrail_proc::papertrail_proc(const string&, time_t, time_t)’:
papertrail_proc.hh:107:36: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
this->ptp_api_key);
^
papertrail_proc.hh: In member function ‘void papertrail_proc::set_url()’:
papertrail_proc.hh:146:47: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
this->ptp_quoted_search.in());