Date: Sun, 31 Jan 2016 20:49:45 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 206804] Inconsistent type handling for sizes in sbuf code Message-ID: <bug-206804-8-4NIzA9Q9ZW@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-206804-8@https.bugs.freebsd.org/bugzilla/> References: <bug-206804-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206804 --- Comment #4 from CTurt <cturt@hardenedbsd.org> --- The error is: /jenkins/workspace/HardenedBSD-CURRENT-unstable-amd64/sy/kern/subr_sbuf.c:2= 26:60: error: format specifies type 'int' but the argument has type 'ssize_t' (aka 'long') [-Werror,-Wformat] ("attempt to create an sbuf of negative length (%d)", length)); Referring to this line: KASSERT(length >=3D 0, ("attempt to create an sbuf of negative length (%d)", length)); I find it odd that this would give an error, but the below line doesn't: KASSERT(s->s_len < s->s_size, ("wrote past end of sbuf (%d >=3D %d)", s->s_len, s->s_size)); Regardless, I've committed a new patch to use the `%zd` format specifier he= re, instead: https://github.com/HardenedBSD/hardenedBSD-playground/commit/5165b5cc55f09b= a357bc1ee41d828ec2864e7d0d.patch --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-206804-8-4NIzA9Q9ZW>