Fix 'gcc -Wextra -Wno-unused-parameter'.

This commit is contained in:
Peter Boström
2014-01-04 13:18:38 +01:00
committed by Michael Stapelberg
parent 2314f10778
commit f78c1ba053
10 changed files with 21 additions and 13 deletions

View File

@ -130,7 +130,7 @@ char *resolve_tilde(const char *path) {
char *head, *tail, *result;
tail = strchr(path, '/');
head = strndup(path, tail ? tail - path : strlen(path));
head = strndup(path, tail ? (size_t)(tail - path) : strlen(path));
int res = glob(head, GLOB_TILDE, NULL, &globbuf);
free(head);