From 4fb59a446983df1d237b9c5a10a9aa1e8f7fbbbd Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 18 Dec 2016 14:34:21 +0000 Subject: Add cast to mask and shift macros to silence warnings generated by clang. ok millert@ --- sys/dev/ic/athnreg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/ic/athnreg.h') 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 @@ -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) \ -- cgit v1.2.3