libzpool assert vs libc assert

Andriy Gapon avg at freebsd.org
Tue Jun 2 14:14:21 UTC 2009


on 02/06/2009 17:06 Andriy Gapon said the following:
> So I am quite sure that mutex_owned should be defined as follows:
> #define  mutex_owned(l)          pthread_mutex_isowned_np((l)->m_lock)

Actually:
#define  mutex_owned(l)          pthread_mutex_isowned_np(&(l)->m_lock)

And on dangers of ignored compiler warnings:
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c:606:
warning: passing argument 6 of 'dmu_buf_hold_array' discards qualifiers from
pointer target type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:264:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:267:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:270:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c:606:
warning: passing argument 6 of 'dmu_buf_hold_array' discards qualifiers from
pointer target type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:264:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:267:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:270:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type

This is during libzpool compilation.

-- 
Andriy Gapon


More information about the freebsd-current mailing list