diff --git a/usr.bin/catman/Makefile b/usr.bin/catman/Makefile index ab4c01453a1b..d80a5fd8ae49 100644 --- a/usr.bin/catman/Makefile +++ b/usr.bin/catman/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ PROG= catman +WARNS?= 6 .include diff --git a/usr.bin/catman/catman.c b/usr.bin/catman/catman.c index 3298c4101eb1..c43781e77c06 100644 --- a/usr.bin/catman/catman.c +++ b/usr.bin/catman/catman.c @@ -710,7 +710,8 @@ determine_locale(void) sep = strchr(locale, '_'); if (sep != NULL && isupper((unsigned char)sep[1]) && isupper((unsigned char)sep[2])) { - asprintf(&lang_locale, "%.*s%s", sep - locale, locale, &sep[3]); + asprintf(&lang_locale, "%.*s%s", (int)(sep - locale), + locale, &sep[3]); } sep = nl_langinfo(CODESET); if (sep != NULL && *sep != '\0' && strcmp(sep, "US-ASCII") != 0) {