kern/177155: [patch] Fixing clang warnings at /sys/dev/safe
hiren.panchasara at gmail.com
Thu Mar 21 17:00:01 UTC 2013
The following reply was made to PR kern/177155; it has been noted by GNATS.
From: hiren panchasara <hiren.panchasara at gmail.com>
To: FreeBSD-gnats-submit at freebsd.org, freebsd-bugs at freebsd.org
Subject: Re: kern/177155: [patch] Fixing clang warnings at /sys/dev/safe
Date: Thu, 21 Mar 2013 09:58:56 -0700
On Wed, Mar 20, 2013 at 1:10 PM, <FreeBSD-gnats-submit at freebsd.org> wrote:
> Thank you very much for your problem report.
> It has the internal identification `kern/177155'.
> The individual assigned to look at your
> report is: freebsd-bugs.
> You can access the state of your problem report at any time
> via this link:
>>Synopsis: [patch] Fixing clang warnings at /sys/dev/safe
>>Arrival-Date: Wed Mar 20 20:10:00 UTC 2013
Taking a closer look, more correct fix looks like this:
--- sys/dev/safe/safe.c (revision 248555)
+++ sys/dev/safe/safe.c (working copy)
@@ -122,7 +122,7 @@
static void safe_intr(void *);
static void safe_callback(struct safe_softc *, struct safe_ringentry *);
static void safe_feed(struct safe_softc *, struct safe_ringentry *);
-static void safe_mcopy(struct mbuf *, struct mbuf *, u_int);
+static void safe_mcopy(struct mbuf *, struct mbuf *, int);
static void safe_rng_init(struct safe_softc *);
static void safe_rng(void *);
@@ -1598,10 +1598,11 @@
* Copy all data past offset from srcm to dstm.
-safe_mcopy(struct mbuf *srcm, struct mbuf *dstm, u_int offset)
+safe_mcopy(struct mbuf *srcm, struct mbuf *dstm, int offset)
- u_int j, dlen, slen;
+ u_int dlen, slen;
caddr_t dptr, sptr;
+ int j;
* Advance src and dst to offset.
Reason being (as per my understanding):
safe_mcopy() is being called from only one place: safe_process() where
3rd arg to safe_mcopy() oplen is of type int.
More information about the freebsd-bugs