diff --git a/src/cui.cpp b/src/cui.cpp index 7683f5c..d365a16 100644 --- a/src/cui.cpp +++ b/src/cui.cpp @@ -121,23 +121,6 @@ std::string uid2username(uid_t uid) { return std::string(pwd->pw_name); } -/** - * Render the provided text at the specified location, truncating if the length - * of the text exceeds a maximum. If the - * text must be truncated, the string ".." will be rendered, followed by max_len - * - 2 characters of the provided text. - */ -static void mvaddstr_truncate_leading(int row, int col, const char *str, - std::size_t str_len, - std::size_t max_len) { - if (str_len < max_len) { - mvaddstr(row, col, str); - } else { - mvaddstr(row, col, ".."); - addnstr(str + 2, max_len - 2); - } -} - /** * Render the provided text at the specified location, truncating if the length * of the text exceeds a maximum. If the diff --git a/src/inode2prog.cpp b/src/inode2prog.cpp index 3c6ee12..3cf7bf4 100644 --- a/src/inode2prog.cpp +++ b/src/inode2prog.cpp @@ -126,7 +126,7 @@ std::string getcmdline(pid_t pid) { std::string cmdline = read_file(filename); // join parameters, keep prgname separate, don't overwrite trailing null - for (int idx = 0; idx < (cmdline.length() - 1); idx++) { + for (size_t idx = 0; idx < (cmdline.length() - 1); idx++) { if (cmdline[idx] == 0x00) { if (replace_null) { cmdline[idx] = ' ';