From 95cb4dcd618774b3f7b5b915c5ce5aa72f853b53 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 9 Aug 2013 17:24:16 -0700 Subject: Fix some clang warnings about integer size/sign conversions Signed-off-by: Alan Coopersmith --- src/sm_error.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/sm_error.c') diff --git a/src/sm_error.c b/src/sm_error.c index 29f6e45..5996600 100644 --- a/src/sm_error.c +++ b/src/sm_error.c @@ -119,7 +119,7 @@ _SmcDefaultErrorHandler(SmcConn smcConn, Bool swap, int offendingMinorOpcode, { case IceBadValue: { - int offset, length, val; + unsigned int offset, length, val; EXTRACT_CARD32 (pData, swap, offset); EXTRACT_CARD32 (pData, swap, length); @@ -132,7 +132,7 @@ _SmcDefaultErrorHandler(SmcConn smcConn, Bool swap, int offendingMinorOpcode, if (length <= 4) { if (length == 1) - val = (int) *pData; + val = (unsigned int) *pData; else if (length == 2) { EXTRACT_CARD16 (pData, swap, val); @@ -233,7 +233,7 @@ _SmsDefaultErrorHandler(SmsConn smsConn, Bool swap, int offendingMinorOpcode, { case IceBadValue: { - int offset, length, val; + unsigned int offset, length, val; EXTRACT_CARD32 (pData, swap, offset); EXTRACT_CARD32 (pData, swap, length); @@ -246,7 +246,7 @@ _SmsDefaultErrorHandler(SmsConn smsConn, Bool swap, int offendingMinorOpcode, if (length <= 4) { if (length == 1) - val = (int) *pData; + val = (unsigned int) *pData; else if (length == 2) { EXTRACT_CARD16 (pData, swap, val); -- cgit v1.2.3