History log of /dflybsd-src/lib/libthread_xu/thread/thr_printf.c (Results 1 – 5 of 5)
Revision Date Author Comments
# 0f037c78 19-Jan-2018 Sascha Wildner <saw@online.de>

libthread_xu: Fix issues detected by gcc80.

The changes to <pthread.h> all deal with -Wnonnull-compare warnings,
which are issued when a function has a NULL check for a parameter that
at the same ti

libthread_xu: Fix issues detected by gcc80.

The changes to <pthread.h> all deal with -Wnonnull-compare warnings,
which are issued when a function has a NULL check for a parameter that
at the same time is marked with __attribute__((nonnull(...))), aka
__nonnull(...).

Such __nonnull() decoration only ever catches those cases where NULL is
passed directly to the function, but not any more indirect ways. What
makes matters worse is that in higher optimization levels (-O >= 2),
GCC will happily optimize out any NULL checks within the function for
these parameters.

This means that __nonnull() is generally inferior to a direct NULL check
in the function itself and if we have both, which newer GCCs warn about
with -Wnonnull-compare (that is part of -Wall), we should remove the
__nonnull().

This commit does that for all parameters which our libthread_xu checks
directly in the function. What remains are __nonnull() for parameters
which are _not_ checked in the functions, to at least catch cases where
NULL is passed directly. We should think about adding real checks for
those parameters too.

While here, add a "/* FALLTHROUGH */" comment in thr_printf.c which
fixes a -Wimplicit-fallthrough warning.

show more ...


# 4a9b8501 16-Sep-2016 zrj <rimvydas.jasinskas@gmail.com>

pthread: Add vprintf variant of _thread_printf, reformat PANIC()

Cleans up intermediate writes.

Taken-from: FreeBSD


# 19451dc5 16-Sep-2016 zrj <rimvydas.jasinskas@gmail.com>

pthread: General pre-cleanup (style, typos etc)

No functional change.


# 5868d2b9 17-Jun-2012 Sascha Wildner <saw@online.de>

Remove unneeded inclusions of <sys/cdefs.h> throughout the tree.


# 71b3fa15 01-Feb-2005 David Xu <davidxu@dragonflybsd.org>

Import initial version of 1:1 pthread library.