diff options
author | bde <bde@FreeBSD.org> | 1999-05-13 12:21:41 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-05-13 12:21:41 +0000 |
commit | fb656193583282f82a18a965e11bf900e1db23aa (patch) | |
tree | 2f16f32f49eed696bfee2c9dc35d697854c247f3 /sys/dev/ic/i82586.h | |
parent | e3601a838c1ea30f83fd5851fb6f9b8384a64c58 (diff) | |
download | FreeBSD-src-fb656193583282f82a18a965e11bf900e1db23aa.zip FreeBSD-src-fb656193583282f82a18a965e11bf900e1db23aa.tar.gz |
Fixed 10 out of 40 lines of -Wcast-qual warnings/errors. 3 lines were
for old confusion of `volatile char *' with `volatile caddr_t'. 7 lines
were for not being careful about aligning pointers to volatiles.
Diffstat (limited to 'sys/dev/ic/i82586.h')
-rw-r--r-- | sys/dev/ic/i82586.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/ic/i82586.h b/sys/dev/ic/i82586.h index c1504fe..704d624b 100644 --- a/sys/dev/ic/i82586.h +++ b/sys/dev/ic/i82586.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: i82586.h,v 1.6 1998/04/15 17:45:58 bde Exp $ + * $Id: i82586.h,v 1.7 1998/08/10 17:21:48 bde Exp $ */ /* @@ -309,11 +309,18 @@ ie_setup_config(volatile struct ie_config_cmd *cmd, cmd->ie_junk = 0xff; } -static __inline caddr_t -Align(caddr_t ptr) { +static __inline void * +Align(void *ptr) { uintptr_t l = (uintptr_t)ptr; l = (l + 3) & ~3L; - return (caddr_t)l; + return (void *)l; +} + +static __inline volatile void * +Alignvol(volatile void *ptr) { + uintptr_t l = (uintptr_t)ptr; + l = (l + 3) & ~3L; + return (volatile void *)l; } static __inline void |