summaryrefslogtreecommitdiff
path: root/src/sm_error.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-09 17:24:16 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-09 17:24:16 -0700
commit95cb4dcd618774b3f7b5b915c5ce5aa72f853b53 (patch)
tree5855871af9beca9549fe978bac71434e53f3828f /src/sm_error.c
parent5a06ff257f72a629539f23b35026fbcdb8bb372e (diff)
Fix some clang warnings about integer size/sign conversions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/sm_error.c')
-rw-r--r--src/sm_error.c8
1 files changed, 4 insertions, 4 deletions
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);