summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbenl <benl@FreeBSD.org>2011-06-18 13:56:33 +0000
committerbenl <benl@FreeBSD.org>2011-06-18 13:56:33 +0000
commit2071e3510abcb0d23655e9ec6f21ded8a0d7fa8a (patch)
tree6edd0c06e1319e9f8e2572723af2f2d72fabda97 /lib
parenta90ed93de49d2b89aafba19680f2fd1d400eb91e (diff)
downloadFreeBSD-src-2071e3510abcb0d23655e9ec6f21ded8a0d7fa8a.zip
FreeBSD-src-2071e3510abcb0d23655e9ec6f21ded8a0d7fa8a.tar.gz
Fix clang warnings.
Approved by: philip (mentor)
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/db/btree/bt_split.c7
-rw-r--r--lib/libprocstat/libprocstat.c4
-rw-r--r--lib/msun/ld80/e_rem_pio2l.h2
3 files changed, 7 insertions, 6 deletions
diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c
index ca8b16a..f0db406 100644
--- a/lib/libc/db/btree/bt_split.c
+++ b/lib/libc/db/btree/bt_split.c
@@ -37,6 +37,7 @@ static char sccsid[] = "@(#)bt_split.c 8.10 (Berkeley) 1/9/95";
__FBSDID("$FreeBSD$");
#include <sys/types.h>
+#include <sys/param.h>
#include <limits.h>
#include <stdio.h>
@@ -482,7 +483,7 @@ bt_rroot(BTREE *t, PAGE *h, PAGE *l, PAGE *r)
WR_RINTERNAL(dest,
l->flags & P_RLEAF ? NEXTINDEX(l) : rec_total(l), l->pgno);
- h->linp[1] = h->upper -= NRINTERNAL;
+ __PAST_END(h->linp, 1) = h->upper -= NRINTERNAL;
dest = (char *)h + h->upper;
WR_RINTERNAL(dest,
r->flags & P_RLEAF ? NEXTINDEX(r) : rec_total(r), r->pgno);
@@ -534,7 +535,7 @@ bt_broot(BTREE *t, PAGE *h, PAGE *l, PAGE *r)
case P_BLEAF:
bl = GETBLEAF(r, 0);
nbytes = NBINTERNAL(bl->ksize);
- h->linp[1] = h->upper -= nbytes;
+ __PAST_END(h->linp, 1) = h->upper -= nbytes;
dest = (char *)h + h->upper;
WR_BINTERNAL(dest, bl->ksize, r->pgno, 0);
memmove(dest, bl->bytes, bl->ksize);
@@ -550,7 +551,7 @@ bt_broot(BTREE *t, PAGE *h, PAGE *l, PAGE *r)
case P_BINTERNAL:
bi = GETBINTERNAL(r, 0);
nbytes = NBINTERNAL(bi->ksize);
- h->linp[1] = h->upper -= nbytes;
+ __PAST_END(h->linp, 1) = h->upper -= nbytes;
dest = (char *)h + h->upper;
memmove(dest, bi, nbytes);
((BINTERNAL *)dest)->pgno = r->pgno;
diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c
index 384fe73..e1bdfcd 100644
--- a/lib/libprocstat/libprocstat.c
+++ b/lib/libprocstat/libprocstat.c
@@ -1283,7 +1283,7 @@ vntype2psfsttype(int type)
static char *
getmnton(kvm_t *kd, struct mount *m)
{
- static struct mount mnt;
+ struct mount mnt;
static struct mtab {
struct mtab *next;
struct mount *m;
@@ -1302,7 +1302,7 @@ getmnton(kvm_t *kd, struct mount *m)
err(1, NULL);
mt->m = m;
bcopy(&mnt.mnt_stat.f_mntonname[0], &mt->mntonname[0], MNAMELEN);
- mnt.mnt_stat.f_mntonname[MNAMELEN] = '\0';
+ mt->mntonname[MNAMELEN] = '\0';
mt->next = mhead;
mhead = mt;
return (mt->mntonname);
diff --git a/lib/msun/ld80/e_rem_pio2l.h b/lib/msun/ld80/e_rem_pio2l.h
index 81a5ab6..75e4e4b 100644
--- a/lib/msun/ld80/e_rem_pio2l.h
+++ b/lib/msun/ld80/e_rem_pio2l.h
@@ -82,7 +82,7 @@ __ieee754_rem_pio2l(long double x, long double *y)
u.e = x;
expsign = u.xbits.expsign;
ex = expsign & 0x7fff;
- if (ex < BIAS + 25 || ex == BIAS + 25 && u.bits.manh < 0xc90fdaa2) {
+ if (ex < BIAS + 25 || (ex == BIAS + 25 && u.bits.manh < 0xc90fdaa2)) {
/* |x| ~< 2^25*(pi/2), medium size */
/* Use a specialized rint() to get fn. Assume round-to-nearest. */
fn = x*invpio2+0x1.8p63;
OpenPOWER on IntegriCloud