Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5d6c93e
sys: Make priority.h and rtprio.h include all dependencies
arichardson Aug 20, 2025
d2f88cf
cross-build: fix bootstrap with clang 19 on glibc systems
arichardson Sep 14, 2025
26b1c09
libcuse: silence -Wthread-safety-analysis warnings
arichardson Sep 14, 2025
f96cab2
cdefs.h: Introduce __nonstring attribute
arichardson Sep 15, 2025
f791aed
rtld: silence clang's unterminated-string-initialization warning
arichardson Sep 14, 2025
9ec1767
libthr: fix -Wunterminated-string-initialization
arichardson Sep 14, 2025
2b76c1a
bin/test: fix -Wunterminated-string-initialization warning
arichardson Sep 15, 2025
f89583a
usr.sbin/pmcannotate: fix use of uninitialized variable
arichardson Sep 15, 2025
616d235
imgact_elf: Fix uninitialized variable use in note_procstat_auxv
arichardson Sep 15, 2025
847b78f
zfs: Fix -Wformat warning with latest clang
arichardson Sep 15, 2025
adc0327
sbin/fsck_msdosfs: fix -Wunterminated-string-initialization
arichardson Sep 15, 2025
1c9f7eb
chacha20: Fix -Wunterminated-string-initialization
arichardson Sep 15, 2025
4f32f81
bin/sh: Fix -Wunterminated-string-initialization
arichardson Sep 15, 2025
7054d24
makefs: Fix -Wunterminated-string-initialization
arichardson Sep 15, 2025
f9aae3a
m4: Fix -Wunterminated-string-initialization
arichardson Sep 15, 2025
ea7d285
libfetch: Fix -Wunterminated-string-initialization
arichardson Sep 14, 2025
56e0792
vtfontcv: Fix -Wunterminated-string-initialization
arichardson Sep 15, 2025
f78777c
bsnmpd/tools: Fix -Wunterminated-string-initialization
arichardson Sep 15, 2025
d452e70
ncurses: Fix -Wunterminated-string-initialization
arichardson Sep 15, 2025
7f0c588
bmake: Fix -Wunterminated-string-initialization
arichardson Sep 15, 2025
064ee8b
bsd.sys.mk: Add -Wno-error=character-conversion for Clang 21+
arichardson Sep 15, 2025
69b8cd9
sys/xen: Use __printflike() instead of format(printf)
arichardson Sep 16, 2025
83377a0
ocs_fc: Use __printflike() instead of format(printf)
arichardson Sep 16, 2025
4394bb8
linux_timer: Fix bad copyout of uninitialized oval
arichardson Sep 16, 2025
71ae6c7
netmap: silence -Wdefault-const-init-field-unsafe warning
arichardson Sep 16, 2025
70633bc
GitHub cross-build CI: Update compiler versions
arichardson Sep 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/cross-bootstrap-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
cross-bindir: /usr/lib/llvm-14/bin
pkgs: bmake libarchive-dev clang-14 lld-14
- os: ubuntu-24.04
compiler: clang-18
cross-bindir: /usr/lib/llvm-18/bin
pkgs: bmake libarchive-dev clang-18 lld-18
compiler: clang-20
cross-bindir: /usr/lib/llvm-20/bin
pkgs: bmake libarchive-dev clang-20 lld-20
- os: macos-latest
compiler: clang-18
cross-toolchain: llvm@18
pkgs: bmake libarchive llvm@18
compiler: clang-21
cross-toolchain: llvm@21
pkgs: bmake libarchive llvm@21 lld@21
- target_arch: amd64
target: amd64
- target_arch: aarch64
Expand Down
2 changes: 1 addition & 1 deletion bin/sh/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ extern char optval[NOPTS];
extern const char optletter[NSHORTOPTS];
#ifdef DEFINE_OPTIONS
char optval[NOPTS];
const char optletter[NSHORTOPTS] = "efIimnsxvVECabupTPh";
const char optletter[NSHORTOPTS] __nonstring = "efIimnsxvVECabupTPh";
static const unsigned char optname[] =
"\007errexit"
"\006noglob"
Expand Down
2 changes: 1 addition & 1 deletion bin/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ enum token {
#define TOKEN_TYPE(token) ((token) & 0xff00)

static const struct t_op {
char op_text[2];
char op_text[2] __nonstring;
short op_num;
} ops1[] = {
{"=", STREQ},
Expand Down
8 changes: 7 additions & 1 deletion contrib/bmake/var.c
Original file line number Diff line number Diff line change
Expand Up @@ -1866,7 +1866,13 @@ QuoteShell(const char *str, bool quoteDollar, LazyBuf *buf)
static char *
Hash(const char *str)
{
static const char hexdigits[16] = "0123456789abcdef";
/*
* Temporary FreeBSD diff: Disable -Wunterminated-string-initialization
* warning by adding 1 to size. We can't use __nonstring unconditionally
* in bmake since the bmake bootstrap headers don't define it.
* TODO: add the __nonstring attribute and change size back to 16.
*/
static const char hexdigits[16 + 1] = "0123456789abcdef";
const unsigned char *ustr = (const unsigned char *)str;

uint32_t h = 0x971e137bU;
Expand Down
2 changes: 1 addition & 1 deletion contrib/ncurses/progs/infocmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ compare_predicate(PredType type, PredIdx idx, const char *name)
#define DATAX() DATA("", "")

typedef struct {
const char from[4];
const char from[8];
const char to[12];
} assoc;

Expand Down
11 changes: 11 additions & 0 deletions krb5/include/autoconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,18 @@
#define STDC_HEADERS 1

/* Define to 1 if strerror_r returns char *. */
/*
* glibc defines two versions of strerror_r, the char* returning one is used
* when _GNU_SOURCE is defined.
*/
#if defined(__linux__) && __has_include(<features.h>)
#include <features.h> /* get __GLIBC__ */
#endif
#if defined(__GLIBC__) && defined(__USE_GNU)
#define STRERROR_R_CHAR_P 1
#else
/* #undef STRERROR_R_CHAR_P */
#endif

/* Define if sys_errlist is defined in errno.h */
#define SYS_ERRLIST_DECLARED 1
Expand Down
2 changes: 1 addition & 1 deletion lib/libcuse/cuse_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static struct cuse_vm_allocation a_cuse[CUSE_ALLOC_UNIT_MAX]
#define CUSE_UNLOCK() \
pthread_mutex_unlock(&m_cuse)

int
int __no_lock_analysis /* No need for locking during init */
cuse_init(void)
{
pthread_mutexattr_t attr;
Expand Down
2 changes: 1 addition & 1 deletion lib/libfetch/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static struct fetcherr socks5_errlist[] = {
};

/* End-of-Line */
static const char ENDL[2] = "\r\n";
static const char ENDL[2] = { '\r', '\n' };


/*** Error-reporting functions ***********************************************/
Expand Down
3 changes: 2 additions & 1 deletion lib/libsysdecode/utrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ sysdecode_utrace(FILE *fp, void *p, size_t len)
struct utrace_malloc um;
struct utrace_malloc32 *pm;
#endif
static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG;
static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] __nonstring =
RTLD_UTRACE_SIG;

if (len == sizeof(struct utrace_rtld) && bcmp(p, rtld_utrace_sig,
sizeof(rtld_utrace_sig)) == 0)
Expand Down
3 changes: 1 addition & 2 deletions lib/libthr/thread/thr_printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ _thread_printf(int fd, const char *fmt, ...)
void
_thread_vprintf(int fd, const char *fmt, va_list ap)
{
static const char digits[16] = "0123456789abcdef";
static const char digits[16] __nonstring = "0123456789abcdef";
char buf[20];
char *s;
unsigned long r, u;
Expand Down Expand Up @@ -147,4 +147,3 @@ pstr(int fd, const char *s)

__sys_write(fd, s, strlen(s));
}

3 changes: 2 additions & 1 deletion libexec/rtld-elf/rtld.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ ld_utrace_log(int event, void *handle, void *mapbase, size_t mapsize,
int refcnt, const char *name)
{
struct utrace_rtld ut;
static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] = RTLD_UTRACE_SIG;
static const char rtld_utrace_sig[RTLD_UTRACE_SIG_SZ] __nonstring =
RTLD_UTRACE_SIG;

memset(&ut, 0, sizeof(ut)); /* clear holes */
memcpy(ut.sig, rtld_utrace_sig, sizeof(ut.sig));
Expand Down
2 changes: 1 addition & 1 deletion libexec/rtld-elf/rtld_utrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#define RTLD_UTRACE_SIG "RTLD"

struct utrace_rtld {
char sig[RTLD_UTRACE_SIG_SZ];
char sig[RTLD_UTRACE_SIG_SZ] __nonstring;
int event;
void *handle;
void *mapbase; /* Used for 'parent' and 'init/fini' */
Expand Down
4 changes: 2 additions & 2 deletions sbin/fsck_msdosfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ checksize(struct fat_descriptor *fat, u_char *p, struct dosDirEntry *dir)
return FSOK;
}

static const u_char dot_name[11] = ". ";
static const u_char dotdot_name[11] = ".. ";
static const u_char dot_name[11] __nonstring = ". ";
static const u_char dotdot_name[11] __nonstring = ".. ";

/*
* Basic sanity check if the subdirectory have good '.' and '..' entries,
Expand Down
4 changes: 4 additions & 0 deletions share/mk/bsd.sys.mk
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ CWARNFLAGS.clang+= -Wno-error=unused-but-set-parameter
# Similar to gcc >= 8.1 -Wno-error=cast-function-type below
CWARNFLAGS.clang+= -Wno-error=cast-function-type-mismatch
.endif
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 210000
# Until gtest is updated: https://github.com/google/googletest/issues/4762
CXXWARNFLAGS.clang+= -Wno-error=character-conversion
.endif
.endif # WARNS <= 6
.if ${WARNS} <= 3
CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-unused-value\
Expand Down
4 changes: 2 additions & 2 deletions sys/compat/linux/linux_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ linux_timer_settime(struct thread *td, struct linux_timer_settime_args *uap)
return (error);
error = kern_ktimer_settime(td, uap->timerid, flags, &val, ovalp);
if (error == 0 && uap->old != NULL) {
error = native_to_linux_itimerspec(&l_val, &val);
error = native_to_linux_itimerspec(&l_oval, &val);
if (error == 0)
error = copyout(&l_oval, uap->old, sizeof(l_oval));
}
Expand All @@ -158,7 +158,7 @@ linux_timer_settime64(struct thread *td, struct linux_timer_settime64_args *uap)
return (error);
error = kern_ktimer_settime(td, uap->timerid, flags, &val, ovalp);
if (error == 0 && uap->old != NULL) {
error = native_to_linux_itimerspec64(&l_val, &val);
error = native_to_linux_itimerspec64(&l_oval, &val);
if (error == 0)
error = copyout(&l_oval, uap->old, sizeof(l_oval));
}
Expand Down
16 changes: 8 additions & 8 deletions sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,28 @@ extern "C" {
#ifndef _ASM

extern void cmn_err(int, const char *, ...)
__attribute__((format(printf, 2, 3)));
__attribute__((format(__printf__, 2, 3)));

extern void vzcmn_err(zoneid_t, int, const char *, __va_list)
__attribute__((format(printf, 3, 0)));
__attribute__((format(__printf__, 3, 0)));

extern void vcmn_err(int, const char *, __va_list)
__attribute__((format(printf, 2, 0)));
__attribute__((format(__printf__, 2, 0)));

extern void zcmn_err(zoneid_t, int, const char *, ...)
__attribute__((format(printf, 3, 4)));
__attribute__((format(__printf__, 3, 4)));

extern void vzprintf(zoneid_t, const char *, __va_list)
__attribute__((format(printf, 2, 0)));
__attribute__((format(__printf__, 2, 0)));

extern void zprintf(zoneid_t, const char *, ...)
__attribute__((format(printf, 2, 3)));
__attribute__((format(__printf__, 2, 3)));

extern void vuprintf(const char *, __va_list)
__attribute__((format(printf, 1, 0)));
__attribute__((format(__printf__, 1, 0)));

extern void panic(const char *, ...)
__attribute__((format(printf, 1, 2), __noreturn__));
__attribute__((format(__printf__, 1, 2), __noreturn__));

#define cmn_err_once(ce, ...) \
do { \
Expand Down
4 changes: 2 additions & 2 deletions sys/contrib/openzfs/include/os/freebsd/spl/sys/kmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ MALLOC_DECLARE(M_SOLARIS);
typedef struct vmem vmem_t;

extern char *kmem_asprintf(const char *, ...)
__attribute__((format(printf, 1, 2)));
__attribute__((format(__printf__, 1, 2)));
extern char *kmem_vasprintf(const char *fmt, va_list ap)
__attribute__((format(printf, 1, 0)));
__attribute__((format(__printf__, 1, 0)));

extern int kmem_scnprintf(char *restrict str, size_t size,
const char *restrict fmt, ...);
Expand Down
4 changes: 2 additions & 2 deletions sys/contrib/openzfs/include/sys/spa.h
Original file line number Diff line number Diff line change
Expand Up @@ -1122,9 +1122,9 @@ extern void spa_set_allocator(spa_t *spa, const char *allocator);

/* Miscellaneous support routines */
extern void spa_load_failed(spa_t *spa, const char *fmt, ...)
__attribute__((format(printf, 2, 3)));
__attribute__((format(__printf__, 2, 3)));
extern void spa_load_note(spa_t *spa, const char *fmt, ...)
__attribute__((format(printf, 2, 3)));
__attribute__((format(__printf__, 2, 3)));
extern void spa_activate_mos_feature(spa_t *spa, const char *feature,
dmu_tx_t *tx);
extern void spa_deactivate_mos_feature(spa_t *spa, const char *feature);
Expand Down
2 changes: 1 addition & 1 deletion sys/contrib/openzfs/include/sys/vdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern int zfs_nocacheflush;
typedef boolean_t vdev_open_children_func_t(vdev_t *vd);

extern void vdev_dbgmsg(vdev_t *vd, const char *fmt, ...)
__attribute__((format(printf, 2, 3)));
__attribute__((format(__printf__, 2, 3)));
extern void vdev_dbgmsg_print_tree(vdev_t *, int);
extern int vdev_open(vdev_t *);
extern void vdev_open_children(vdev_t *);
Expand Down
2 changes: 1 addition & 1 deletion sys/contrib/openzfs/include/sys/zfs_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ extern int zfs_dbgmsg_enable;
extern void __set_error(const char *file, const char *func, int line, int err);
extern void __zfs_dbgmsg(char *buf);
extern void __dprintf(boolean_t dprint, const char *file, const char *func,
int line, const char *fmt, ...) __attribute__((format(printf, 5, 6)));
int line, const char *fmt, ...) __attribute__((format(__printf__, 5, 6)));

/*
* Some general principles for using zfs_dbgmsg():
Expand Down
4 changes: 2 additions & 2 deletions sys/crypto/chacha20/chacha.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ typedef struct chacha_ctx chacha_ctx;
a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);

static const char sigma[16] = "expand 32-byte k";
static const char tau[16] = "expand 16-byte k";
static const char sigma[16] __nonstring = "expand 32-byte k";
static const char tau[16] __nonstring = "expand 16-byte k";

LOCAL void
chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits)
Expand Down
6 changes: 4 additions & 2 deletions sys/dev/netmap/netmap_kloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ netmap_sync_kloop_tx_ring(const struct sync_kloop_ring_args *a)
struct netmap_kring *kring = a->kring;
struct nm_csb_atok *csb_atok = a->csb_atok;
struct nm_csb_ktoa *csb_ktoa = a->csb_ktoa;
struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */
/* shadow copy of the netmap_ring */
struct netmap_ring shadow_ring = {0};
#ifdef SYNC_KLOOP_POLL
bool more_txspace = false;
#endif /* SYNC_KLOOP_POLL */
Expand Down Expand Up @@ -317,7 +318,8 @@ netmap_sync_kloop_rx_ring(const struct sync_kloop_ring_args *a)
struct netmap_kring *kring = a->kring;
struct nm_csb_atok *csb_atok = a->csb_atok;
struct nm_csb_ktoa *csb_ktoa = a->csb_ktoa;
struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */
/* shadow copy of the netmap_ring */
struct netmap_ring shadow_ring = {0};
int dry_cycles = 0;
#ifdef SYNC_KLOOP_POLL
bool some_recvd = false;
Expand Down
3 changes: 1 addition & 2 deletions sys/dev/ocs_fc/ocs_ddump.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
extern void ocs_ddump_endfile(ocs_textbuf_t *textbuf);
extern void ocs_ddump_section(ocs_textbuf_t *textbuf, const char *name, uint32_t instance);
extern void ocs_ddump_endsection(ocs_textbuf_t *textbuf, const char *name, uint32_t instance);
__attribute__((format(printf,3,4)))
extern void ocs_ddump_value(ocs_textbuf_t *textbuf, const char *name, const char *fmt, ...);
extern void ocs_ddump_value(ocs_textbuf_t *textbuf, const char *name, const char *fmt, ...) __printflike(3, 4);

Check warning on line 49 in sys/dev/ocs_fc/ocs_ddump.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters
extern void ocs_ddump_buffer(ocs_textbuf_t *textbuf, const char *name, uint32_t instance, void *buffer, uint32_t size);
extern int32_t ocs_save_ddump(ocs_t *ocs, uint32_t flags, uint32_t qentries);
extern int32_t ocs_get_saved_ddump(ocs_t *ocs, ocs_textbuf_t *textbuf);
Expand Down
3 changes: 1 addition & 2 deletions sys/dev/ocs_fc/ocs_mgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@
extern void ocs_mgmt_end_unnumbered_section(ocs_textbuf_t *textbuf, const char *name);
extern void ocs_mgmt_emit_property_name(ocs_textbuf_t *textbuf, int access, const char *name);
extern void ocs_mgmt_emit_string(ocs_textbuf_t *textbuf, int access, const char *name, const char *value);
__attribute__((format(printf,4,5)))
extern void ocs_mgmt_emit_int(ocs_textbuf_t *textbuf, int access, const char *name, const char *fmt, ...);
extern void ocs_mgmt_emit_int(ocs_textbuf_t *textbuf, int access, const char *name, const char *fmt, ...) __printflike(4, 5);

Check failure on line 98 in sys/dev/ocs_fc/ocs_mgmt.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 120 characters
extern void ocs_mgmt_emit_boolean(ocs_textbuf_t *textbuf, int access, const char *name, const int value);
extern int parse_wwn(char *wwn_in, uint64_t *wwn_out);

Expand Down
2 changes: 1 addition & 1 deletion sys/dev/ocs_fc/ocs_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@
* @return returns 0 for success, a negative error code value for failure.
*/

extern int ocs_sem_init(ocs_sem_t *sem, int val, const char *name, ...) __attribute__((format(printf, 3, 4)));
extern int ocs_sem_init(ocs_sem_t *sem, int val, const char *name, ...) __printflike(3, 4);

Check warning on line 714 in sys/dev/ocs_fc/ocs_os.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters

/**
* @brief execute a P (decrement) operation
Expand Down
12 changes: 4 additions & 8 deletions sys/dev/ocs_fc/ocs_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@
extern void ocs_textbuf_free(ocs_t *ocs, ocs_textbuf_t *textbuf);
extern void ocs_textbuf_putc(ocs_textbuf_t *textbuf, uint8_t c);
extern void ocs_textbuf_puts(ocs_textbuf_t *textbuf, char *s);
__attribute__((format(printf,2,3)))
extern void ocs_textbuf_printf(ocs_textbuf_t *textbuf, const char *fmt, ...);
__attribute__((format(printf,2,0)))
extern void ocs_textbuf_vprintf(ocs_textbuf_t *textbuf, const char *fmt, va_list ap);
extern void ocs_textbuf_printf(ocs_textbuf_t *textbuf, const char *fmt, ...) __printflike(2, 3);

Check warning on line 106 in sys/dev/ocs_fc/ocs_utils.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters
extern void ocs_textbuf_vprintf(ocs_textbuf_t *textbuf, const char *fmt, va_list ap) __printflike(2, 0);

Check warning on line 107 in sys/dev/ocs_fc/ocs_utils.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters
extern void ocs_textbuf_buffer(ocs_textbuf_t *textbuf, uint8_t *buffer, uint32_t buffer_length);
extern void ocs_textbuf_copy(ocs_textbuf_t *textbuf, uint8_t *buffer, uint32_t buffer_length);
extern int32_t ocs_textbuf_remaining(ocs_textbuf_t *textbuf);
Expand Down Expand Up @@ -325,10 +323,8 @@
extern ocs_ramlog_t *ocs_ramlog_init(ocs_t *ocs, uint32_t buffer_len, uint32_t buffer_count);
extern void ocs_ramlog_free(ocs_t *ocs, ocs_ramlog_t *ramlog);
extern void ocs_ramlog_clear(ocs_t *ocs, ocs_ramlog_t *ramlog, int clear_start_of_day, int clear_recent);
__attribute__((format(printf,2,3)))
extern int32_t ocs_ramlog_printf(void *os, const char *fmt, ...);
__attribute__((format(printf,2,0)))
extern int32_t ocs_ramlog_vprintf(ocs_ramlog_t *ramlog, const char *fmt, va_list ap);
extern int32_t ocs_ramlog_printf(void *os, const char *fmt, ...) __printflike(2, 3);

Check warning on line 326 in sys/dev/ocs_fc/ocs_utils.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters
extern int32_t ocs_ramlog_vprintf(ocs_ramlog_t *ramlog, const char *fmt, va_list ap) __printflike(2, 0);

Check warning on line 327 in sys/dev/ocs_fc/ocs_utils.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters
extern int32_t ocs_ddump_ramlog(ocs_textbuf_t *textbuf, ocs_ramlog_t *ramlog);

#endif
2 changes: 1 addition & 1 deletion sys/dev/xen/blkback/blkback.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct xbb_softc;
struct xbb_xen_req;

static void xbb_attach_failed(struct xbb_softc *xbb, int err, const char *fmt,
...) __attribute__((format(printf, 3, 4)));
...) __printflike(3, 4);
static int xbb_shutdown(struct xbb_softc *xbb);

/*------------------------------ Data Structures -----------------------------*/
Expand Down
10 changes: 6 additions & 4 deletions sys/kern/imgact_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2712,12 +2712,15 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep)
struct proc *p;
size_t size;
int structsize;

#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
structsize = sizeof(Elf32_Auxinfo);
#else
structsize = sizeof(Elf_Auxinfo);
#endif
p = arg;
if (sb == NULL) {
size = 0;
sb = sbuf_new(NULL, NULL, AT_COUNT * sizeof(Elf_Auxinfo),
SBUF_FIXEDLEN);
sb = sbuf_new(NULL, NULL, AT_COUNT * structsize, SBUF_FIXEDLEN);
sbuf_set_drain(sb, sbuf_count_drain, &size);
sbuf_bcat(sb, &structsize, sizeof(structsize));
PHOLD(p);
Expand All @@ -2727,7 +2730,6 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep)
sbuf_delete(sb);
*sizep = size;
} else {
structsize = sizeof(Elf_Auxinfo);
sbuf_bcat(sb, &structsize, sizeof(structsize));
PHOLD(p);
proc_getauxv(curthread, p, sb);
Expand Down
7 changes: 7 additions & 0 deletions sys/sys/cdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,13 @@
#define __printf0like(fmtarg, firstvararg)
#endif

/* To silence warnings about null terminator not fitting into an array. */
#if __has_attribute(__nonstring__)
#define __nonstring __attribute__((__nonstring__))
#else
#define __nonstring
#endif

#define __strong_reference(sym,aliassym) \
extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
#ifdef __STDC__
Expand Down
Loading
Loading