Date: Tue, 23 Jun 2009 23:37:26 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r194798 - head/usr.bin/makewhatis Message-ID: <200906232337.n5NNbQbQ095238@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Tue Jun 23 23:37:25 2009 New Revision: 194798 URL: http://svn.freebsd.org/changeset/base/194798 Log: %.s expects an int as the length specifier, so cast properly. Modified: head/usr.bin/makewhatis/makewhatis.c Modified: head/usr.bin/makewhatis/makewhatis.c ============================================================================== --- head/usr.bin/makewhatis/makewhatis.c Tue Jun 23 23:34:46 2009 (r194797) +++ head/usr.bin/makewhatis/makewhatis.c Tue Jun 23 23:37:25 2009 (r194798) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906232337.n5NNbQbQ095238>