diff options
author | delphij <delphij@FreeBSD.org> | 2009-06-23 23:37:25 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-06-23 23:37:25 +0000 |
commit | 6890bf4027e4cc291de70a201516b9ba03dc3cf7 (patch) | |
tree | aff03af3ca923c951a0c810561c268442f374cd3 /usr.bin | |
parent | d9ff11dbb2363bd47152e57983b6866e6c7cf92a (diff) | |
download | FreeBSD-src-6890bf4027e4cc291de70a201516b9ba03dc3cf7.zip FreeBSD-src-6890bf4027e4cc291de70a201516b9ba03dc3cf7.tar.gz |
%.s expects an int as the length specifier, so cast properly.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/makewhatis/makewhatis.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/makewhatis/makewhatis.c b/usr.bin/makewhatis/makewhatis.c index c9404f6..6b2dce4 100644 --- a/usr.bin/makewhatis/makewhatis.c +++ b/usr.bin/makewhatis/makewhatis.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include <ctype.h> #include <dirent.h> #include <err.h> +#include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -1002,7 +1003,7 @@ main(int argc, char **argv) char *sep = strchr(locale, '_'); if (sep != NULL && isupper(sep[1]) && isupper(sep[2])) { - asprintf(&lang_locale, "%.*s%s", sep - locale, locale, &sep[3]); + asprintf(&lang_locale, "%.*s%s", (int)(ptrdiff_t)(sep - locale), locale, &sep[3]); } } break; |