瀏覽代碼

Fix clang-tidy warnings

master
Arun Prakash Jana 5 年之前
父節點
當前提交
ef159b9985
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: A75979F35C080412
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. +6
    -5
      src/nnn.c

+ 6
- 5
src/nnn.c 查看文件

@@ -2138,7 +2138,7 @@ static int xstrverscasecmp(const char * const s1, const char * const s2)
state += (c1 == '0') + (xisdigit(c1) != 0); state += (c1 == '0') + (xisdigit(c1) != 0);
} }


state = result_type[state * 3 + (((c2 == '0') + (xisdigit(c2) != 0)))];
state = (uchar)result_type[state * 3 + (((c2 == '0') + (xisdigit(c2) != 0)))];


switch (state) { switch (state) {
case VCMP: case VCMP:
@@ -2609,7 +2609,8 @@ static int filterentries(char *path, char *lastname)


/* toggle string or regex filter */ /* toggle string or regex filter */
if (*ch == FILTER) { if (*ch == FILTER) {
wln[0] = ln[0] = (ln[0] == FILTER) ? RFILTER : FILTER;
ln[0] = (ln[0] == FILTER) ? RFILTER : FILTER;
wln[0] = (uchar)ln[0];
cfg.regex ^= 1; cfg.regex ^= 1;
filterfn = (filterfn == &visible_str) ? &visible_re : &visible_str; filterfn = (filterfn == &visible_str) ? &visible_re : &visible_str;
showfilter(ln); showfilter(ln);
@@ -2998,7 +2999,7 @@ static bool parsekvpair(kv **arr, char **envcpy, const uchar id, uchar *items)


while (*ptr && i < maxitems) { while (*ptr && i < maxitems) {
if (ptr == nextkey) { if (ptr == nextkey) {
kvarr[i].key = *ptr;
kvarr[i].key = (uchar)*ptr;
if (*++ptr != ':') if (*++ptr != ':')
return FALSE; return FALSE;
if (*++ptr == '\0') if (*++ptr == '\0')
@@ -6733,7 +6734,7 @@ int main(int argc, char *argv[])
if (middle_click_env[0] == '^' && middle_click_env[1]) if (middle_click_env[0] == '^' && middle_click_env[1])
middle_click_key = CONTROL(middle_click_env[1]); middle_click_key = CONTROL(middle_click_env[1]);
else else
middle_click_key = middle_click_env[0];
middle_click_key = (uchar)middle_click_env[0];
#endif #endif
const char* const env_opts = xgetenv(env_cfg[NNN_OPTS], NULL); const char* const env_opts = xgetenv(env_cfg[NNN_OPTS], NULL);
int env_opts_id = env_opts ? (int)strlen(env_opts) : -1; int env_opts_id = env_opts ? (int)strlen(env_opts) : -1;
@@ -6834,7 +6835,7 @@ int main(int argc, char *argv[])
break; break;
case 'T': case 'T':
if (env_opts_id < 0) if (env_opts_id < 0)
sort = optarg[0];
sort = (uchar)optarg[0];
break; break;
case 'V': case 'V':
fprintf(stdout, "%s\n", VERSION); fprintf(stdout, "%s\n", VERSION);


Loading…
取消
儲存