diff options
author | ru <ru@FreeBSD.org> | 2008-03-25 13:28:12 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2008-03-25 13:28:12 +0000 |
commit | e8df07e5aae1419b98df908ca680093606df32a5 (patch) | |
tree | 7233b2e924a4a1b14c9e5d9e0f3e8c653f849df1 /lib/libthr/thread/thr_attr.c | |
parent | e9ab62a9ff9f3f66ab31bd1c0286c8539166b6a3 (diff) | |
download | FreeBSD-src-e8df07e5aae1419b98df908ca680093606df32a5.zip FreeBSD-src-e8df07e5aae1419b98df908ca680093606df32a5.tar.gz |
Compile libthr with warnings.
Diffstat (limited to 'lib/libthr/thread/thr_attr.c')
-rw-r--r-- | lib/libthr/thread/thr_attr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index dafdf15..a01a06d 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -547,13 +547,13 @@ _pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) return(ret); } -static int -_get_kern_cpuset_size() +static size_t +_get_kern_cpuset_size(void) { static int kern_cpuset_size = 0; if (kern_cpuset_size == 0) { - int len; + size_t len; len = sizeof(kern_cpuset_size); if (sysctlbyname("kern.smp.maxcpus", &kern_cpuset_size, @@ -587,9 +587,9 @@ _pthread_attr_setaffinity_np(pthread_attr_t *pattr, size_t cpusetsize, } if (cpusetsize > attr->cpusetsize) { - int kern_size = _get_kern_cpuset_size(); + size_t kern_size = _get_kern_cpuset_size(); if (cpusetsize > kern_size) { - int i; + size_t i; for (i = kern_size; i < cpusetsize; ++i) { if (((char *)cpuset)[i]) return (EINVAL); @@ -627,7 +627,7 @@ _pthread_attr_getaffinity_np(const pthread_attr_t *pattr, size_t cpusetsize, memset(((char *)cpuset) + attr->cpusetsize, 0, cpusetsize - attr->cpusetsize); } else { - int kern_size = _get_kern_cpuset_size(); + size_t kern_size = _get_kern_cpuset_size(); memset(cpuset, -1, MIN(cpusetsize, kern_size)); if (cpusetsize > kern_size) memset(((char *)cpuset) + kern_size, 0, |