diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-12-18 14:34:21 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-12-18 14:34:21 +0000 |
commit | 4fb59a446983df1d237b9c5a10a9aa1e8f7fbbbd (patch) | |
tree | 2bd444ca3ec924882c2e2788378340d803d14a47 /sys/dev/ic/athnreg.h | |
parent | a9636ccabfc48a7e6124873475a08dffb52d6a92 (diff) |
Add cast to mask and shift macros to silence warnings generated by clang.
ok millert@
Diffstat (limited to 'sys/dev/ic/athnreg.h')
-rw-r--r-- | sys/dev/ic/athnreg.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/athnreg.h b/sys/dev/ic/athnreg.h index f35358d1634..45d72fea749 100644 --- a/sys/dev/ic/athnreg.h +++ b/sys/dev/ic/athnreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: athnreg.h,v 1.18 2012/06/10 21:23:36 kettenis Exp $ */ +/* $OpenBSD: athnreg.h,v 1.19 2016/12/18 14:34:20 kettenis Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -1472,11 +1472,11 @@ */ /* Mask and Shift (getter). */ #define MS(val, field) \ - (((val) & field##_M) >> field##_S) + (((uint32_t)(val) & field##_M) >> field##_S) /* Shift and Mask (setter). */ #define SM(field, val) \ - (((val) << field##_S) & field##_M) + (((uint32_t)(val) << field##_S) & field##_M) /* Rewrite. */ #define RW(var, field, val) \ |