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());
Fix warnings like:
ptimec.hh: In function ‘void ftime_i(char*, off_t&, ssize_t, const exttm&)’:
ptimec.hh:387:57: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
snprintf(&dst[off_inout], len - off_inout, "%lld", t);
^
In this case we know that the `t` returned by `tm2sec` is a number of
seconds, so a long should be long enough, and anyway there is already
code checking for overflow.
Fixes#368.
https://github.com/tstack/lnav/issues/368
Fix repeated errors like this:
log_format.hh:1138:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len < jfe.jfe_min_width) {
Fixes#369.
https://github.com/tstack/lnav/issues/369
If we have both 64-bit and 32-bit versions of ncurses installed,
currently the 32-bit libraries in /lib get found first, so gcc fails to
link against them, and ./configure ends up thinking that we're missing
ncurses libraries.
So scan /lib64 before /lib. There might be a better fix, but hopefully
it will avoid breaking 32-bit distributions and distributions which have
64-bit libraries in /lib.