diff options
author | dim <dim@FreeBSD.org> | 2015-01-29 21:54:01 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-29 21:54:01 +0000 |
commit | 7004e07d17a3d26b64cd3c1be7c9ccbb2c93f45b (patch) | |
tree | e9280730218b6e35e98a03295a72301f8be3114f /sys/libkern | |
parent | 5a70de8b519ebe82d8ee5fe2b0e3d04c91b83f66 (diff) | |
download | FreeBSD-src-7004e07d17a3d26b64cd3c1be7c9ccbb2c93f45b.zip FreeBSD-src-7004e07d17a3d26b64cd3c1be7c9ccbb2c93f45b.tar.gz |
Similar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(),
strtoul() and strtouq(), by using __DECONST. No functional change.
MFC after: 3 days
Diffstat (limited to 'sys/libkern')
-rw-r--r-- | sys/libkern/strtoq.c | 2 | ||||
-rw-r--r-- | sys/libkern/strtoul.c | 2 | ||||
-rw-r--r-- | sys/libkern/strtouq.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/libkern/strtoq.c b/sys/libkern/strtoq.c index ea4e7ed..d855056 100644 --- a/sys/libkern/strtoq.c +++ b/sys/libkern/strtoq.c @@ -125,6 +125,6 @@ strtoq(const char *nptr, char **endptr, int base) } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } diff --git a/sys/libkern/strtoul.c b/sys/libkern/strtoul.c index 5c97ca9..f7399dc 100644 --- a/sys/libkern/strtoul.c +++ b/sys/libkern/strtoul.c @@ -103,6 +103,6 @@ strtoul(nptr, endptr, base) } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } diff --git a/sys/libkern/strtouq.c b/sys/libkern/strtouq.c index 5877396..f8303a0 100644 --- a/sys/libkern/strtouq.c +++ b/sys/libkern/strtouq.c @@ -102,6 +102,6 @@ strtouq(const char *nptr, char **endptr, int base) } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } |