[ci]: slience some clang-tidy warnings

the warnings on r_readdir(), img_load_gif() and strcpy seems to be false
positives. the warning about fmt being unused is valid, but not worth
fixing with additional #ifdef guards.

use `assert` to silence the false positive cases when possible,
otherwise use a NOLINT comment with an explanation.
This commit is contained in:
NRK
2022-06-17 22:16:37 +06:00
committed by Gitea
parent 4cf17d2349
commit 5c3a796e55
3 changed files with 6 additions and 2 deletions

View File

@ -79,7 +79,7 @@ void arl_setup(arl_t *arl, const char *filepath)
if (base != NULL) {
arl->filename[++base - filepath] = '\0';
add_watch(arl->fd, &arl->wd_dir, arl->filename, IN_CREATE | IN_MOVED_TO);
strcpy(arl->filename, base);
strcpy(arl->filename, base); /* NOLINT: basename will always be shorter than fullpath */
}
}