From 72bf57c12ab5e9d433af8b2b54c9041c85f90222 Mon Sep 17 00:00:00 2001 From: jxh Date: Wed, 19 Nov 1997 23:19:58 +0000 Subject: Added casts to comparisons of char variables to 0, since chars are unsigned by default in SGI. --- TAO/TAO_IDL/ast/ast_expression.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'TAO/TAO_IDL') diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp index c6f77e8b7a1..fd9d03fabbd 100644 --- a/TAO/TAO_IDL/ast/ast_expression.cpp +++ b/TAO/TAO_IDL/ast/ast_expression.cpp @@ -418,7 +418,7 @@ coerce_value(AST_Expression::AST_ExprValue *ev, AST_Expression::ExprType t) ev->et = AST_Expression::EV_short; return ev; case AST_Expression::EV_char: - if (ev->u.cval < 0) + if ((signed char) ev->u.cval < 0) return NULL; ev->u.usval = (unsigned short) ev->u.cval; ev->et = AST_Expression::EV_ushort; @@ -528,7 +528,7 @@ coerce_value(AST_Expression::AST_ExprValue *ev, AST_Expression::ExprType t) ev->et = AST_Expression::EV_ulong; return ev; case AST_Expression::EV_char: - if (ev->u.cval < 0) + if ((signed char) ev->u.cval < 0) return NULL; ev->u.ulval = (unsigned long) ev->u.cval; ev->et = AST_Expression::EV_ulong; @@ -795,7 +795,7 @@ coerce_value(AST_Expression::AST_ExprValue *ev, AST_Expression::ExprType t) ev->et = AST_Expression::EV_octet; return ev; case AST_Expression::EV_char: - if (ev->u.cval < 0) + if ((signed char) ev->u.cval < 0) return NULL; ev->u.oval = (unsigned char) ev->u.cval; ev->et = AST_Expression::EV_octet; -- cgit v1.2.1