You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by an...@apache.org on 2017/10/02 00:14:11 UTC

[07/12] incubator-trafodion git commit: TRAFODION-2731 CodeCleanup: Phase 4. Remove legacy/obsolete pragmas

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_conv.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_conv.cpp b/core/sql/exp/exp_conv.cpp
index ecda9c2..1d51814 100644
--- a/core/sql/exp/exp_conv.cpp
+++ b/core/sql/exp/exp_conv.cpp
@@ -1123,17 +1123,13 @@ ex_expr::exp_return_type convLargeDecToAscii(char *target,
   // fill in digits
   Lng32 i = 0;
   for (i = 0; i < (requiredDigits-sourceScale); i++, targetPos++, currPos++)
-#pragma nowarn(1506)   // warning elimination 
     target[targetPos] = source[currPos] + '0';
-#pragma warn(1506)  // warning elimination 
 
   // if we have a scale, add decimal point and some digits
   if (sourceScale) {
     target[targetPos++] = '.';
     for (i = 0; i < sourceScale; i++, targetPos++, currPos++)
-#pragma nowarn(1506)   // warning elimination 
       target[targetPos] = source[currPos] + '0';
-#pragma warn(1506)  // warning elimination 
   };
 
   // Right pad blanks for fixed char.
@@ -2114,9 +2110,7 @@ ex_expr::exp_return_type convInt64ToDec(char *target,
       return ex_expr::EXPR_ERROR;
     };
 
-#pragma nowarn(1506)   // warning elimination 
     target[currPos--] = '0' + (char)(source % 10);
-#pragma warn(1506)  // warning elimination 
     source /= 10;
   };
   
@@ -2165,9 +2159,7 @@ ex_expr::exp_return_type convAsciiToDec(char *target,
       {
 	// pad the target with zeros
 	while (targetPos >= 0)
-#pragma nowarn(1506)   // warning elimination 
 	  target[targetPos--] = '0' - offset;
-#pragma warn(1506)  // warning elimination 
 	
 	return ex_expr::EXPR_OK;
       }
@@ -2244,9 +2236,7 @@ ex_expr::exp_return_type convAsciiToDec(char *target,
 
   // only zeros found, target is 0
   if (sourceStart == sourceLen) {
-#pragma nowarn(1506)   // warning elimination 
     str_pad(target, targetLen, '0' - offset);
-#pragma warn(1506)  // warning elimination 
     return ex_expr::EXPR_OK;
   };
 
@@ -2269,9 +2259,7 @@ ex_expr::exp_return_type convAsciiToDec(char *target,
   while ((sourcePos >= sourceStart) && (targetPos >= 0)) {
     // add zeros to adjust scale
     if (targetScale > sourceScale) {
-#pragma nowarn(1506)   // warning elimination 
       target[targetPos--] = '0' - offset;
-#pragma warn(1506)  // warning elimination 
       targetScale--;
     }
     else if (targetScale < sourceScale) {
@@ -2296,9 +2284,7 @@ ex_expr::exp_return_type convAsciiToDec(char *target,
         return ex_expr::EXPR_ERROR;
       };
       // copy source to target
-#pragma nowarn(1506)   // warning elimination 
       target[targetPos--] = source[sourcePos--] - offset;
-#pragma warn(1506)  // warning elimination 
     };
   };
 
@@ -2321,9 +2307,7 @@ ex_expr::exp_return_type convAsciiToDec(char *target,
 
   // left pad the target with zeros
   while (targetPos >= 0)
-#pragma nowarn(1506)   // warning elimination 
     target[targetPos--] = '0' - offset;
-#pragma warn(1506)  // warning elimination 
 
   // add sign
   if (negative)
@@ -2552,9 +2536,7 @@ ex_expr::exp_return_type convAsciiFieldToInt64(Int64 &target,
   while ((currPos < sourceLen) && ((source[currPos] >= '0') && 
                                    (source[currPos] <= '9')))
   { 
-#pragma nowarn(1506)   // warning elimination 
     short thisDigit = source[currPos] - '0';
-#pragma warn(1506)  // warning elimination 
     if (target > (LLONG_MAX / 10))
     { // next power of 10 causes an overflow
       ExRaiseDetailSqlError(heap, diagsArea, EXE_NUMERIC_OVERFLOW, source,
@@ -2796,9 +2778,7 @@ ex_expr::exp_return_type convAsciiToInterval(char *target,
         return ex_expr::EXPR_ERROR;
       };
       if (negInterval)
-#pragma nowarn(1506)   // warning elimination 
 	*(Target<short> *)target = -(short)intermediate;
-#pragma warn(1506)  // warning elimination 
       else
 	*(Target<short> *)target = (short)intermediate;
       break;
@@ -3251,9 +3231,7 @@ ex_conv_clause::ConvResult convLargeDecToDecAndScale(char *target,
 
   str_pad(target, targetPos, '0');
   while (sourcePos < sourceLen)
-#pragma nowarn(1506)   // warning elimination 
     target[targetPos++] = source[sourcePos++] + '0';
-#pragma warn(1506)  // warning elimination 
 
   // do any scaling down needed
   while (exponent > 0)
@@ -4882,7 +4860,6 @@ ex_expr::exp_return_type convCharToChar(
 
 
 
-#pragma warning (disable : 4101)  //warning elimination
 ex_expr::exp_return_type
 convDoIt(char * source,
 	 Lng32 sourceLen,
@@ -5774,9 +5751,7 @@ convDoIt(char * source,
         {
           if (dataConversionErrorFlag != 0)
             { // Set the target value.
-#pragma nowarn(1506)   // warning elimination 
               *(short *)target = *(unsigned short *)source;
-#pragma warn(1506)  // warning elimination 
             }
           else
             { // Check target precision. Then set target value.
@@ -5792,9 +5767,7 @@ convDoIt(char * source,
                                  diagsArea,
                                  tempFlags) == ex_expr::EXPR_OK)
                 {
-#pragma nowarn(1506)   // warning elimination 
                   *(short *)target = *(unsigned short *)source;
-#pragma warn(1506)  // warning elimination 
                 }
               else
                 {
@@ -6356,9 +6329,7 @@ convDoIt(char * source,
         {
           if (dataConversionErrorFlag != 0)
             { // Set the target value.
-#pragma nowarn(1506)   // warning elimination 
               *(Lng32 *)target = *(ULng32 *)source;
-#pragma warn(1506)  // warning elimination 
             }
           else
             { // Check target precision. Then set target value.
@@ -6374,9 +6345,7 @@ convDoIt(char * source,
 		                 diagsArea,
                                  tempFlags) == ex_expr::EXPR_OK)
                 {
-#pragma nowarn(1506)   // warning elimination 
                   *(Lng32 *)target = *(ULng32 *)source;
-#pragma warn(1506)  // warning elimination 
                 }
               else
                 {
@@ -7297,11 +7266,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
               float floatsource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
               if (floatsource2 > floatsource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -7374,11 +7339,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
               float floatsource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
               if (floatsource2 > floatsource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -7453,11 +7414,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
               float floatsource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
               if (floatsource2 > floatsource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -7530,11 +7487,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
               float floatsource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
               if (floatsource2 > floatsource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -7609,11 +7562,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
               float floatsource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
               if (floatsource2 > floatsource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -7726,9 +7675,7 @@ convDoIt(char * source,
   case CONV_FLOAT32_DECS:
     {
       float floatsource = *floatSrcPtr;
-#pragma nowarn(1506)   // warning elimination 
       if (floatsource < getMinDecValue(targetLen, targetType))
-#pragma warn(1506)  // warning elimination 
         {
           if (dataConversionErrorFlag != 0)
             {
@@ -7743,9 +7690,7 @@ convDoIt(char * source,
               return ex_expr::EXPR_ERROR;
             }
         }
-#pragma nowarn(1506)   // warning elimination 
       else if (floatsource > getMaxDecValue(targetLen))
-#pragma warn(1506)  // warning elimination 
         {
           if (dataConversionErrorFlag != 0)
             {
@@ -7766,11 +7711,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
               float floatsource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
               if (floatsource2 > floatsource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -7924,11 +7865,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
               double doublesource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
               if (doublesource2 > doublesource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -8000,12 +7937,8 @@ convDoIt(char * source,
           Int64 int64source = (Int64) doublesource;
           if (dataConversionErrorFlag != 0)
             {
-#pragma warning (disable : 4244)   //warning elimination
               // Convert back and check for a value change.
-#pragma nowarn(1506)   // warning elimination 
               double doublesource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)   //warning elimination
               if (doublesource2 > doublesource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -8079,11 +8012,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
               double doublesource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
               if (doublesource2 > doublesource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -8156,13 +8085,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
               double doublesource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma nowarn(1506)   // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
-#pragma warn(1506)  // warning elimination 
               if (doublesource2 > doublesource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -8237,13 +8160,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
               double doublesource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma nowarn(1506)   // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
-#pragma warn(1506)  // warning elimination 
               if (doublesource2 > doublesource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -8356,9 +8273,7 @@ convDoIt(char * source,
   case CONV_FLOAT64_DECU:
     {
       double doublesource = *doubleSrcPtr;
-#pragma nowarn(1506)   // warning elimination 
       if (doublesource < getMinDecValue(targetLen, targetType))
-#pragma warn(1506)  // warning elimination 
         {
           if (dataConversionErrorFlag != 0)
             {
@@ -8373,9 +8288,7 @@ convDoIt(char * source,
               return ex_expr::EXPR_ERROR;
             }
         }
-#pragma nowarn(1506)   // warning elimination 
       else if (doublesource > getMaxDecValue(targetLen))
-#pragma warn(1506)  // warning elimination 
         {
           if (dataConversionErrorFlag != 0)
             {
@@ -8396,11 +8309,7 @@ convDoIt(char * source,
           if (dataConversionErrorFlag != 0)
             {
               // Convert back and check for a value change.
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination
               double doublesource2 = int64source;
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
               if (doublesource2 > doublesource)
                 {
                   *dataConversionErrorFlag = ex_conv_clause::CONV_RESULT_ROUNDED_UP;
@@ -11417,7 +11326,6 @@ convDoIt(char * source,
   };
   return ex_expr::EXPR_OK;
 }
-#pragma warning (default : 4101)  //warning elimination
       
 ex_expr::exp_return_type ex_conv_clause::eval(char *op_data[],
 					      CollHeap *heap,
@@ -11553,7 +11461,6 @@ ex_expr::exp_return_type ex_conv_clause::eval(char *op_data[],
 	source = (char*)ptrVal;
       }
 
-#pragma nowarn(1506)   // warning elimination 
     retcode =  convDoIt(source, //op_data[1],
 			src->getLength(op_data[-MAX_OPERANDS + 1]),
 			src->getDatatype(),
@@ -11572,7 +11479,6 @@ ex_expr::exp_return_type ex_conv_clause::eval(char *op_data[],
 			dataConversionErrorFlag,
 			convFlags
                         );
-#pragma warn(1506)  // warning elimination 
 
     if ((flags_ & REVERSE_DATA_ERROR_CONVERSION_FLAG) != 0)
       {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_datetime.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_datetime.cpp b/core/sql/exp/exp_datetime.cpp
index 90403b1..3a899e7 100644
--- a/core/sql/exp/exp_datetime.cpp
+++ b/core/sql/exp/exp_datetime.cpp
@@ -1164,9 +1164,7 @@ short ExpDatetime::subDatetimeDatetime(Attributes *datetimeOpType,
   // Scale the result to the interval qualifier's fractional precision.
   //
   if (intervalEndField == REC_DATE_SECOND) {
-#pragma nowarn(1506)   // warning elimination 
     short fpDiff = intervalOpType->getScale() - datetimeOpType->getScale();
-#pragma warn(1506)   // warning elimination 
     if (fpDiff > 0) {
       do {
         result *= 10;
@@ -3091,9 +3089,7 @@ convertToAscii(Lng32 value, char *&result, UInt32 width)
   // Format value as a string.
   //
   while ((value != 0) && (i > 0)) {
-#pragma nowarn(1506)   // warning elimination 
     result[--i] = '0' + (char) (value % 10);
-#pragma warn(1506)  // warning elimination 
     value /= 10;
   }
 
@@ -3747,9 +3743,7 @@ short ExpDatetime::getDisplaySize(Lng32 datetimeCode,
      displayLength += 1 /* for separator */ + fractionPrecision;
     }
   }
-#pragma nowarn(1506)   // warning elimination 
   return displayLength;
-#pragma warn(1506)  // warning elimination 
 }
 
 short ExpDatetime::convAsciiDatetimeToASCII(char *srcData,
@@ -3764,14 +3758,10 @@ short ExpDatetime::convAsciiDatetimeToASCII(char *srcData,
 {
   short rc = 0;
 
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
   SimpleType tempST(REC_DATETIME, 12, 
             srcScale, srcPrecision,
             ExpTupleDesc::SQLMX_FORMAT,
             0, 0, 0, 0, Attributes::NO_DEFAULT, 0);
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
 
   char tempDTBuf[12]; // max length for an internal datetime value.
 
@@ -3782,13 +3772,9 @@ short ExpDatetime::convAsciiDatetimeToASCII(char *srcData,
   if (rc)
     return rc;
 
-#pragma warning (disable : 4244)  //warning elimination
-#pragma nowarn(1506)   // warning elimination 
   rc =
     tempDT.convDatetimeToASCII(tempDTBuf, dstData, dstLen, format, NULL,
                    heap, diagsArea);
-#pragma warn(1506)  // warning elimination 
-#pragma warning (default : 4244)  //warning elimination
   if (rc < 0)
     return rc;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_datetime.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_datetime.h b/core/sql/exp/exp_datetime.h
index d8d0bd7..c665d21 100644
--- a/core/sql/exp/exp_datetime.h
+++ b/core/sql/exp/exp_datetime.h
@@ -44,7 +44,6 @@
 #include "exp_attrs.h"
 #include "Int64.h"
 
-#pragma warning ( disable : 4251 )
 
 class ExpDatetime : public SimpleType {
 
@@ -393,7 +392,6 @@ private:
 
 };
 
-#pragma warning ( default : 4251 )
 
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_dp2_expr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_dp2_expr.cpp b/core/sql/exp/exp_dp2_expr.cpp
index 5b689be..0f83500 100644
--- a/core/sql/exp/exp_dp2_expr.cpp
+++ b/core/sql/exp/exp_dp2_expr.cpp
@@ -53,13 +53,11 @@
 // -----------------------------------------------------------------------
 Lng32 ExpDP2Expr::spaceNeededForWorkAtp()
 {
-#pragma nowarn(1506)   // warning elimination 
   return ( ( criDesc_ != (ExCriDescPtr) NULL )
 	  ? 2 * (sizeof(atp_struct) +
 		 criDesc_->noTuples() * (sizeof(tupp) + 
 					 sizeof(tupp_descriptor)))
 	  : 0);
-#pragma warn(1506)  // warning elimination 
 }
 
 ExpDP2Expr::ExpDP2Expr(ex_expr_base * expr, 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_dp2_expr.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_dp2_expr.h b/core/sql/exp/exp_dp2_expr.h
index d163066..af47936 100644
--- a/core/sql/exp/exp_dp2_expr.h
+++ b/core/sql/exp/exp_dp2_expr.h
@@ -50,7 +50,6 @@ class ExpDP2Expr;
 typedef NAOpenObjectPtrTempl<atp_struct> AtpStructPtr;
 typedef NAVersionedObjectPtrTempl<ExpDP2Expr> ExpDP2ExprPtr;
 
-#pragma warning ( disable : 4251 )
 
 /////////////////////////////////////////////////////////////////////////////
 // class ExpDP2Expr
@@ -145,6 +144,5 @@ public:
     
 };
 
-#pragma warning ( default : 4251 )
 
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_expr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_expr.cpp b/core/sql/exp/exp_expr.cpp
index f7dc7bb..1b0098b 100644
--- a/core/sql/exp/exp_expr.cpp
+++ b/core/sql/exp/exp_expr.cpp
@@ -60,24 +60,16 @@ char *ex_expr::findVTblPtr(short classID)
   switch (classID)
   {
     case exp_INPUT_OUTPUT:
-#pragma nowarn(1506)   // warning elimination 
       GetVTblPtr(vtblPtr, InputOutputExpr);
-#pragma warn(1506)  // warning elimination 
       break;
     case exp_AGGR:
-#pragma nowarn(1506)   // warning elimination 
       GetVTblPtr(vtblPtr, AggrExpr);
-#pragma warn(1506)  // warning elimination 
       break;
     case exp_LEAN_EXPR:
-#pragma nowarn(1506)   // warning elimination 
       GetVTblPtr(vtblPtr, ex_expr_lean);
-#pragma warn(1506)  // warning elimination 
       break;
     default:
-#pragma nowarn(1506)   // warning elimination 
       GetVTblPtr(vtblPtr, ex_expr);
-#pragma warn(1506)  // warning elimination 
       break;
   }
   return vtblPtr;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_expr.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_expr.h b/core/sql/exp/exp_expr.h
index 477e855..8283d40 100644
--- a/core/sql/exp/exp_expr.h
+++ b/core/sql/exp/exp_expr.h
@@ -141,7 +141,6 @@ public:
   void  setNExDbgLvl( Int32 Lvl )            { NExDbgLvl_ = Lvl ; }
 };
 
-#pragma warning ( disable : 4251 )
 
 class  ex_expr : public NAVersionedObject
 {
@@ -865,7 +864,6 @@ protected:
 //////////////////////////////////////////////////
 // class AggrExpr
 //////////////////////////////////////////////////
-#pragma nowarn(1319)  // warning elimination 
 class  AggrExpr : public ex_expr {
 
   enum Flags {
@@ -947,7 +945,6 @@ public:
   NABoolean  isOneRowAggr()
                  { return( (flags_ & ONE_ROW_AGGR) != 0); }
 };
-#pragma warn(1319)  // warning elimination 
 
 // -----------------------------------------------------------------------
 // Template instantiation to produce a 64-bit pointer emulator class
@@ -1250,7 +1247,6 @@ public:
 };
 
 
-#pragma warning ( default : 4251 )
  
 ///////////////////////////////////////////////////
 // class Target

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_function.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_function.cpp b/core/sql/exp/exp_function.cpp
index 64f2c3b..b0e01de 100644
--- a/core/sql/exp/exp_function.cpp
+++ b/core/sql/exp/exp_function.cpp
@@ -808,9 +808,7 @@ ex_expr::exp_return_type ex_function_get_bit_value_at::eval(char *op_data[],
 						     CollHeap *heap,
 						     ComDiagsArea** diagsArea)
 {
-#pragma nowarn(1506)   // warning elimination 
   Lng32 buffLen = getOperand(1)->getLength(op_data[1]);
-#pragma warn(1506)   // warning elimination 
   
   // Get the position from operand 2.
   Lng32 pos = *(Lng32 *)op_data[2];
@@ -829,9 +827,7 @@ ex_expr::exp_return_type ex_function_get_bit_value_at::eval(char *op_data[],
 
   unsigned char onechar = *(unsigned char *)(op_data[1] + charnum);
   unsigned char mask = 1;
-#pragma nowarn(1506)   // warning elimination 
   mask = mask<<bitnum;
-#pragma warn(1506)   // warning elimination 
 
   *((ULng32*)op_data[0]) = (ULng32) (mask & onechar ? 1 : 0);
 
@@ -845,10 +841,8 @@ ex_expr::exp_return_type ex_function_is_bitwise_and_true::eval(char *op_data[],
 						     CollHeap *heap,
 						     ComDiagsArea** diagsArea)
 {
-#pragma nowarn(1506)   // warning elimination 
   Lng32 leftSize = getOperand(1)->getLength(op_data[1]);
   Lng32 rightSize = getOperand(2)->getLength(op_data[2]);
-#pragma warn(1506)   // warning elimination 
   
   if (leftSize != rightSize)
   {
@@ -933,10 +927,8 @@ ex_expr::exp_return_type ex_function_concat::eval(char *op_data[],
 						  CollHeap *heap,
 						  ComDiagsArea** diagsArea)
 {
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
   Lng32 len2 = getOperand(2)->getLength(op_data[-MAX_OPERANDS+2]);
-#pragma warn(1506)   // warning elimination 
 
   CharInfo::CharSet cs = ((SimpleType *)getOperand(1))->getCharSet();
 
@@ -1346,9 +1338,7 @@ ex_expr::exp_return_type ex_function_trim_char::eval(char *op_data[],
   char trimCharSmallBuf[lenTrimCharSmallBuf];
 
   // find out the length of trim character.
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
-#pragma warn(1506)   // warning elimination 
 
   CharInfo::CharSet cs = ((SimpleType *)getOperand(0))->getCharSet();
 
@@ -1381,9 +1371,7 @@ ex_expr::exp_return_type ex_function_trim_char::eval(char *op_data[],
       return ex_expr::EXPR_ERROR;
     }   
 
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len2 = getOperand(2)->getLength(op_data[-MAX_OPERANDS+2]);
-#pragma warn(1506)   // warning elimination 
 
   if (cs == CharInfo::UTF8) // If so, must ignore any filler spaces at end of string
   {
@@ -1782,9 +1770,7 @@ ex_expr::exp_return_type ex_function_oct_length::eval(char *op_data[],
      Int32 prec1 = ((SimpleType *)getOperand(1))->getPrecision();
      len1 = Attributes::trimFillerSpaces( op_data[1], prec1, len1, cs );
   }
-#pragma nowarn(1506)   // warning elimination 
   *(Lng32 *)op_data[0] = len1;
-#pragma warn(1506)   // warning elimination 
   
   return ex_expr::EXPR_OK;
 };
@@ -2017,9 +2003,7 @@ ex_expr::exp_return_type ExFunctionConvertHex::eval(char *op_data[],
 {
   static const char HexArray[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
 
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
-#pragma warn(1506)  // warning elimination 
   if (getOperType() == ITM_CONVERTTOHEX)
     {
       Int32 i;
@@ -2079,27 +2063,17 @@ ex_expr::exp_return_type ExFunctionConvertHex::eval(char *op_data[],
 	      unsigned char upper4Bits;
 	      unsigned char lower4Bits;
 	      if ((op_data[1][i] >= '0') && (op_data[1][i] <= '9'))
-#pragma nowarn(1506)   // warning elimination 
 		upper4Bits = (unsigned char)(op_data[1][i]) - '0';
-#pragma warn(1506)  // warning elimination 
 	      else
-#pragma nowarn(1506)   // warning elimination 
 		upper4Bits = (unsigned char)(op_data[1][i]) - 'A' + 10;
-#pragma warn(1506)  // warning elimination 
 
 	      if ((op_data[1][i+1] >= '0') && (op_data[1][i+1] <= '9'))
-#pragma nowarn(1506)   // warning elimination 
 		lower4Bits = (unsigned char)(op_data[1][i+1]) - '0';
-#pragma warn(1506)  // warning elimination 
 	      else
-#pragma nowarn(1506)   // warning elimination 
 		lower4Bits = (unsigned char)(op_data[1][i+1]) - 'A' + 10;
-#pragma warn(1506)  // warning elimination 
 
 	      
-#pragma nowarn(1506)   // warning elimination 
 	      op_data[0][j] = (upper4Bits << 4) | lower4Bits;
-#pragma warn(1506)  // warning elimination 
 
 	      i += 2;
 	      j++;
@@ -2227,9 +2201,7 @@ ex_function_char_length_doublebyte::eval(char *op_data[],
   // The data type of result is long.
 
   *(Lng32 *)op_data[0] = 
-#pragma nowarn(1506)   // warning elimination 
 	(getOperand(1)->getLength(op_data[-MAX_OPERANDS+1])) >> 1;
-#pragma warn(1506)  // warning elimination 
 
 
   return ex_expr::EXPR_OK;
@@ -2243,9 +2215,7 @@ ex_expr::exp_return_type ex_function_position::eval(char *op_data[],
 
 
   // search for operand 1
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
-#pragma warn(1506)  // warning elimination 
   if ( cs == CharInfo::UTF8 )
   {
      Int32 prec1 = ((SimpleType *)getOperand(1))->getPrecision();
@@ -2253,9 +2223,7 @@ ex_expr::exp_return_type ex_function_position::eval(char *op_data[],
   }
   
   // in operand 2
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len2 = getOperand(2)->getLength(op_data[-MAX_OPERANDS+2]);
-#pragma warn(1506)  // warning elimination 
   if ( cs == CharInfo::UTF8 )
   {
      Int32 prec2 = ((SimpleType *)getOperand(2))->getPrecision();
@@ -2303,17 +2271,13 @@ ex_expr::exp_return_type ex_function_position_doublebyte::eval(char *op_data[],
 						    CollHeap*,
 						    ComDiagsArea**)
 {
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = ( getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]) ) / sizeof(NAWchar);
-#pragma warn(1506)  // warning elimination 
   
   // If len1 is 0, return a position of 1.
   Lng32 position = 1;
   if (len1 > 0)
     {
-#pragma nowarn(1506)   // warning elimination 
       Lng32 len2 = ( getOperand(2)->getLength(op_data[-MAX_OPERANDS+2]) ) / sizeof(NAWchar);
-#pragma warn(1506)  // warning elimination 
 
       NAWchar* pat = (NAWchar*)op_data[1];
       NAWchar* source = (NAWchar*)op_data[2];
@@ -2372,9 +2336,7 @@ ex_expr::exp_return_type ExFunctionTokenStr::eval(char *op_data[],
 {
   CharInfo::CharSet cs = ((SimpleType *)getOperand(1))->getCharSet();
   // search for operand 1
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
-#pragma warn(1506)  // warning elimination 
   if ( cs == CharInfo::UTF8 )
   {
      Int32 prec1 = ((SimpleType *)getOperand(1))->getPrecision();
@@ -2382,9 +2344,7 @@ ex_expr::exp_return_type ExFunctionTokenStr::eval(char *op_data[],
   }
   
   // in operand 2
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len2 = getOperand(2)->getLength(op_data[-MAX_OPERANDS+2]);
-#pragma warn(1506)  // warning elimination 
   if ( cs == CharInfo::UTF8 )
   {
      Int32 prec2 = ((SimpleType *)getOperand(2))->getPrecision();
@@ -2792,9 +2752,7 @@ ex_expr::exp_return_type ex_function_dayofweek::eval(char *op_data[],
   month = *datetimeOpData++;
   day = *datetimeOpData;
   interval = datetimeOpType->getTotalDays(year, month, day);
-#pragma nowarn(1506)   // warning elimination 
   unsigned short result = (unsigned short)((interval + 1) % 7) + 1;
-#pragma warn(1506)  // warning elimination 
   str_cpy_all(op_data[0], (char *) &result, sizeof(result));
   return ex_expr::EXPR_OK;
 }
@@ -3504,9 +3462,7 @@ void ex_function_encode::encodeKeyValue(Attributes * attr,
     //
     if (source[0] & 0200) {
       for (Lng32 i = 0; i < length; i++)
-#pragma nowarn(1506)   // warning elimination 
         target[i] = ~source[i];
-#pragma warn(1506)  // warning elimination 
     } else {
       if (target != source)
         str_cpy_all(target, source, length);
@@ -4328,7 +4284,6 @@ ex_expr::exp_return_type ex_function_explode_varchar::eval(char *op_data[],
   if (forInsert_)
     {
       // move source to target. No blankpadding.
-#pragma nowarn(1506)   // warning elimination 
       return convDoIt(op_data[1],
 		      getOperand(1)->getLength(op_data[-MAX_OPERANDS + 1]),
 		      getOperand(1)->getDatatype(),
@@ -4343,12 +4298,10 @@ ex_expr::exp_return_type ex_function_explode_varchar::eval(char *op_data[],
 		      getOperand(0)->getVCIndicatorLength(),
 		      heap,
 		      diagsArea);
-#pragma warn(1506)  // warning elimination 
     }
   else
     {
       // move source to target. Blankpad target to maxLength.
-#pragma nowarn(1506)   // warning elimination 
       if (convDoIt(op_data[1],
 		   getOperand(1)->getLength(op_data[-MAX_OPERANDS + 1]),
 		   getOperand(0)->getDatatype(),
@@ -4364,7 +4317,6 @@ ex_expr::exp_return_type ex_function_explode_varchar::eval(char *op_data[],
 		   heap,
 		   diagsArea))
 	return ex_expr::EXPR_ERROR;
-#pragma warn(1506)  // warning elimination 
       
       // Move max length to length bytes of target.
       getOperand(0)->setVarLength(getOperand(0)->getLength(),
@@ -5339,9 +5291,7 @@ ex_expr::exp_return_type ExpRaiseErrorFunction::eval(char *op_data[],
   
 	if (getNumOperands()==2) 
         {
-#pragma nowarn(1506)   // warning elimination 
            Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
-#pragma warn(1506)  // warning elimination 
            op_data[1][len1] = '\0';
            *(*diagsArea) << DgString1(op_data[1]);  // The string expression
 	} 
@@ -5431,9 +5381,7 @@ ex_expr::exp_return_type ExFunctionPack::eval(char* op_data[],
     char* nullByte = op_data[0] + nullBitOffsetInBytes + sizeof(Int32);
 
     // Used to set/unset the null bit.
-#pragma nowarn(1506)   // warning elimination 
     unsigned char nullByteMask = (1 << nullBitOffsetInBits);
-#pragma warn(1506)  // warning elimination 
 
     // Turn bit off/on depending on whether operand is null.
     if(nullFlag == 0)
@@ -5492,20 +5440,16 @@ ex_expr::exp_return_type ExFunctionPack::eval(char* op_data[],
         if(bitsToCopyThisRound > bitsToCopy) bitsToCopyThisRound = bitsToCopy;
 
         // Mask has ones in the those positions where bits will be copied to.
-#pragma nowarn(1506)   // warning elimination 
         unsigned char mask = ((0xFF >> tgtBitOffset) <<
                               (8 - bitsToCopyThisRound)) >>
                               (8 - tgtBitOffset - bitsToCopyThisRound);
-#pragma warn(1506)  // warning elimination 
 
         // Clear target bits. Keep other bits unchanged in the target byte.
         (*tgtBytePtr) &= (~mask);
 
         // Align source bits with its the destination. Mask off other bits.
         unsigned char srcByte = *(op_data[1] + srcByteOffset);
-#pragma nowarn(1506)   // warning elimination 
         srcByte = ((srcByte >> srcBitOffset) << tgtBitOffset) & mask;
-#pragma warn(1506)  // warning elimination 
 
         // Make the copy.
         (*tgtBytePtr) |= srcByte;
@@ -5598,9 +5542,7 @@ ExUnPackCol::eval(char *op_data[], CollHeap *heap, ComDiagsArea **diagsArea)
 
     // The byte of the CHAR field containing the bit.
     //
-#pragma nowarn(1506)   // warning elimination 
     Lng32 byteOffset = sizeof(Int32) + (bitOffset >> 3);
-#pragma warn(1506)  // warning elimination 
 
     // The bit of the byte at byteOffset to be extracted.
     //
@@ -5685,9 +5627,7 @@ ExUnPackCol::eval(char *op_data[], CollHeap *heap, ComDiagsArea **diagsArea)
 
       // The index into the byte of the value.
       //
-#pragma nowarn(1506)   // warning elimination 
       Lng32 itemIndex = index & ( itemsPerByte - 1);
-#pragma warn(1506)  // warning elimination 
 
       // A mask to extract an item of size width.
       //
@@ -5712,14 +5652,10 @@ ExUnPackCol::eval(char *op_data[], CollHeap *heap, ComDiagsArea **diagsArea)
     //
     switch(getOperand(0)->getLength()) {
     case 1:
-#pragma nowarn(1506)   // warning elimination 
       *(unsigned char *)op_data[0] = value;
-#pragma warn(1506)  // warning elimination 
       return ex_expr::EXPR_OK;
     case 2:
-#pragma nowarn(1506)   // warning elimination 
       *(unsigned short *)op_data[0] = value;
-#pragma warn(1506)  // warning elimination 
       return ex_expr::EXPR_OK;
     case 4:
       *(ULng32 *)op_data[0] = value;
@@ -5731,9 +5667,7 @@ ExUnPackCol::eval(char *op_data[], CollHeap *heap, ComDiagsArea **diagsArea)
       return ex_expr::EXPR_ERROR;
     }
 
-#pragma nowarn(203)   // warning elimination 
     return ex_expr::EXPR_OK;
-#pragma warn(203)  // warning elimination 
   }
 
 
@@ -5813,9 +5747,7 @@ ExUnPackCol::eval(char *op_data[], CollHeap *heap, ComDiagsArea **diagsArea)
       // to the destination.  This is the first time this
       // byte is written to.
       //
-#pragma nowarn(1506)   // warning elimination 
       op_data[0][dindex] = byte >> rshift;
-#pragma warn(1506)  // warning elimination 
     }
 
     dindex++;
@@ -5827,9 +5759,7 @@ ExUnPackCol::eval(char *op_data[], CollHeap *heap, ComDiagsArea **diagsArea)
   //
   for(i = 0; i < (Lng32) getOperand(0)->getLength(); i++) {
 
-#pragma nowarn(1506)   // warning elimination 
     unsigned char mask = (width > 7) ? 0xFF : masks[width];
-#pragma warn(1506)  // warning elimination 
     
     op_data[0][i] &= mask;
     width -= 8;
@@ -5857,7 +5787,6 @@ ex_expr::exp_return_type ex_function_translate::eval(char *op_data[],
   ULng32 convFlags = (flags_ & TRANSLATE_FLAG_ALLOW_INVALID_CODEPOINT ?
                       CONV_ALLOW_INVALID_CODE_VALUE : 0);
 
-#pragma nowarn(1506)   // warning elimination 
       return convDoIt(op_data[1],
         op1->getLength(op_data[-MAX_OPERANDS + 1]),
         op1->getDatatype(),
@@ -5875,7 +5804,6 @@ ex_expr::exp_return_type ex_function_translate::eval(char *op_data[],
         (ConvInstruction)convType,
         NULL,
         convFlags);
-#pragma warn(1506)  // warning elimination 
 }
   
 void ExFunctionRandomNum::initSeed(char *op_data[])
@@ -5892,9 +5820,7 @@ void ExFunctionRandomNum::initSeed(char *op_data[])
       if (getNumOperands() == 2)
 	{
 	  // seed is specified as an argument. Use it.
-#pragma nowarn(1506)   // warning elimination 
 	  seed_ = *(ULng32 *)op_data[1];
-#pragma warn(1506)  // warning elimination 
 	  return;
 	}
 
@@ -6012,9 +5938,7 @@ void ExFunctionRandomSelection::initDiff()
     // reset the selProbability_ to original value in case this function
     // gets called again
     
-#pragma nowarn(1506)   // warning elimination 
     selProbability_ += difference_;
-#pragma warn(1506)  // warning elimination 
   }
 }
 
@@ -6060,12 +5984,8 @@ ex_expr::exp_return_type ExProgDistrib::eval(char *op_data[],
   ULng32 i = 2;
 
   while(offset >= i && i <= totNumValues) {
-#pragma nowarn(1506)   // warning elimination 
     Lng32 n1 = offset % i;
-#pragma warn(1506)  // warning elimination 
-#pragma nowarn(1506)   // warning elimination 
     Lng32 n2 = offset / i;
-#pragma warn(1506)  // warning elimination 
     if (n1 == 0) {
       offset = (i-1) * (n2 - 1) + resultValue;
       resultValue = i;
@@ -6569,9 +6489,7 @@ ex_expr::exp_return_type ex_function_json_object_field_text::eval(char *op_data[
 {
     CharInfo::CharSet cs = ((SimpleType *)getOperand(1))->getCharSet();
     // search for operand 1
-#pragma nowarn(1506)   // warning elimination 
     Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
-#pragma warn(1506)  // warning elimination 
     if ( cs == CharInfo::UTF8 )
     {
         Int32 prec1 = ((SimpleType *)getOperand(1))->getPrecision();
@@ -6579,9 +6497,7 @@ ex_expr::exp_return_type ex_function_json_object_field_text::eval(char *op_data[
     }
 
     // in operand 2
-#pragma nowarn(1506)   // warning elimination 
     Lng32 len2 = getOperand(2)->getLength(op_data[-MAX_OPERANDS+2]);
-#pragma warn(1506)  // warning elimination 
     if ( cs == CharInfo::UTF8 )
     {
         Int32 prec2 = ((SimpleType *)getOperand(2))->getPrecision();
@@ -7254,9 +7170,7 @@ short ex_function_encode::decodeKeyValue(Attributes * attr,
     {
       // compliment all bytes
       for (Lng32 k = 0; k < encodedKeyLen; k++)
-#pragma nowarn(1506)   // warning elimination 
 	target[k] = ~(source[k]);
-#pragma warn(1506)  // warning elimination 
       
       source = target;
     }
@@ -7442,9 +7356,7 @@ short ex_function_encode::decodeKeyValue(Attributes * attr,
     //
     if (NOT(source[0] & 0200)) {
       for (Lng32 i = 0; i < length; i++)
-#pragma nowarn(1506)   // warning elimination 
         target[i] = ~source[i];
-#pragma warn(1506)  // warning elimination 
     } else {
       if (target != source)
         str_cpy_all(target, source, length);
@@ -7496,9 +7408,7 @@ short ex_function_encode::decodeKeyValue(Attributes * attr,
 	// this was a negative number.
 	// flip all bits.
 	for (Lng32 i = 0; i < length; i++)
-#pragma nowarn(1506)   // warning elimination 
 	  target[i] = ~source[i];
-#pragma warn(1506)  // warning elimination 
       }
 
     // here comes the dependent part
@@ -7546,9 +7456,7 @@ short ex_function_encode::decodeKeyValue(Attributes * attr,
 	// this was a negative number.
 	// flip all bits.
 	for (Lng32 i = 0; i < length; i++)
-#pragma nowarn(1506)   // warning elimination 
 	  target[i] = ~source[i];
-#pragma warn(1506)  // warning elimination 
       }
 
     // here comes the dependent part
@@ -8606,4 +8514,3 @@ aes_decrypt_error:
 
   return ex_expr::EXPR_ERROR;
 }
-#pragma warn(1506)  // warning elimination 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_function.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_function.h b/core/sql/exp/exp_function.h
index 45779fa..1f8732a 100644
--- a/core/sql/exp/exp_function.h
+++ b/core/sql/exp/exp_function.h
@@ -45,7 +45,6 @@
 #include "exp_dp2_expr.h"
 #include "SequenceGeneratorAttributes.h"
 
-#pragma warning ( disable : 4251 )
 
 class ex_function_clause;
 
@@ -4120,7 +4119,6 @@ private:
 
 };
 
-#pragma warning ( default : 4251 )
 
 #ifndef ULONG
   #define ULONG ULng32

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_function_lower_unicode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_function_lower_unicode.cpp b/core/sql/exp/exp_function_lower_unicode.cpp
index 381798b..11864f3 100644
--- a/core/sql/exp/exp_function_lower_unicode.cpp
+++ b/core/sql/exp/exp_function_lower_unicode.cpp
@@ -61,9 +61,7 @@ ex_expr::exp_return_type ex_function_lower_unicode::eval(char *op_data[],
 						 CollHeap*,
 						 ComDiagsArea**)
 {
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
-#pragma warn(1506)  // warning elimination 
   
   getOperand(0)->setVarLength(len1, op_data[-MAX_OPERANDS]);
   

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_function_substring_unicode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_function_substring_unicode.cpp b/core/sql/exp/exp_function_substring_unicode.cpp
index 29300c2..7fa576e 100644
--- a/core/sql/exp/exp_function_substring_unicode.cpp
+++ b/core/sql/exp/exp_function_substring_unicode.cpp
@@ -61,9 +61,7 @@ ex_expr::exp_return_type ex_function_substring_doublebyte::eval(char *op_data[],
 						 CollHeap* heap,
 						 ComDiagsArea** diagsArea)
 {
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
-#pragma warn(1506)  // warning elimination 
 
   len1 /= sizeof(NAWchar); // len1 now counts in terms of number of NCHARs.
   

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_function_trim_unicode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_function_trim_unicode.cpp b/core/sql/exp/exp_function_trim_unicode.cpp
index 1e73446..d26bd5f 100644
--- a/core/sql/exp/exp_function_trim_unicode.cpp
+++ b/core/sql/exp/exp_function_trim_unicode.cpp
@@ -57,9 +57,7 @@ ex_expr::exp_return_type ex_function_trim_doublebyte::eval(char *op_data[],
 						ComDiagsArea** diagsArea)
 {
   // find out the length of trim character.
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = (getOperand(1)->getLength(op_data[-MAX_OPERANDS+1])) / sizeof(NAWchar);
-#pragma warn(1506)  // warning elimination 
   
   // len1 (length of trim character) must be 1. Raise an exception if greater
   // than 1.
@@ -69,9 +67,7 @@ ex_expr::exp_return_type ex_function_trim_doublebyte::eval(char *op_data[],
       return ex_expr::EXPR_ERROR;
     }   
   
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len2 = (getOperand(2)->getLength(op_data[-MAX_OPERANDS+2])) / sizeof(NAWchar);
-#pragma warn(1506)  // warning elimination 
   
   // Find how many leading characters in operand 2 correspond to the trim
   // character.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_function_upper_unicode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_function_upper_unicode.cpp b/core/sql/exp/exp_function_upper_unicode.cpp
index 09ae764..854da1b 100644
--- a/core/sql/exp/exp_function_upper_unicode.cpp
+++ b/core/sql/exp/exp_function_upper_unicode.cpp
@@ -61,9 +61,7 @@ ex_expr::exp_return_type ex_function_upper_unicode::eval(char *op_data[],
 				 CollHeap* heap,
 				 ComDiagsArea** diagsArea)
 { 
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
-#pragma warn(1506)  // warning elimination 
   // Now, copy the contents of operand 1 after the case change into
   // operand 0.
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_interval.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_interval.cpp b/core/sql/exp/exp_interval.cpp
index 1aa4a3a..159fc98 100644
--- a/core/sql/exp/exp_interval.cpp
+++ b/core/sql/exp/exp_interval.cpp
@@ -153,8 +153,6 @@ Lng32 ExpInterval::getDisplaySize(Lng32 fsDatatype,
       if (fractionPrecision)
 	result += fractionPrecision + 1;       // 1 for "."
     }
-#pragma nowarn(1506)   // warning elimination 
   return result;
-#pragma warn(1506)  // warning elimination 
 }
   

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_like.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_like.cpp b/core/sql/exp/exp_like.cpp
index e08aa53..4cd365f 100644
--- a/core/sql/exp/exp_like.cpp
+++ b/core/sql/exp/exp_like.cpp
@@ -555,11 +555,9 @@ ex_expr::exp_return_type ex_like_clause_char::eval(char *op_data[],
     cs = ((SimpleType *)getOperand(1))->getIsoMapping();
 
   // get length of operands
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
   Lng32 len2 = getOperand(2)->getLength(op_data[-MAX_OPERANDS+2]);
   Lng32 len3 = 0;
-#pragma warn(1506)  // warning elimination 
   if ( cs == CharInfo::UTF8 )
   {
      Int32 prec1 = ((SimpleType *)getOperand(1))->getPrecision();
@@ -578,9 +576,7 @@ ex_expr::exp_return_type ex_like_clause_char::eval(char *op_data[],
     escapeChar = NULL;
   else {
     // get length of escape character
-#pragma nowarn(1506)   // warning elimination 
     len3 = getOperand(3)->getLength(op_data[-MAX_OPERANDS+3]);
-#pragma warn(1506)  // warning elimination 
     if ( cs == CharInfo::UTF8 )
     {
        Int32 prec3 = ((SimpleType *)getOperand(3))->getPrecision();
@@ -682,10 +678,8 @@ ex_expr::exp_return_type ex_like_clause_doublebyte::eval(char *op_data[],
                                                          ComDiagsArea** diagsArea)
 {
   // get length of operands
-#pragma nowarn(1506)   // warning elimination 
   Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
   Lng32 len2 = getOperand(2)->getLength(op_data[-MAX_OPERANDS+2]);
-#pragma warn(1506)  // warning elimination 
 
   NAWchar wPercentChar = 0;
   NAWchar wUnderScoreChar = 0;
@@ -726,13 +720,11 @@ ex_expr::exp_return_type ex_like_clause_doublebyte::eval(char *op_data[],
     }
   }
 
-#pragma nowarn(1506)   // warning elimination 
   LikePatternString patternString(op_data[2], (UInt16)len2, 
     getOperand(1)->getCharSet(), escapeChar, BYTES_PER_NAWCHAR,
     (char*)&wUnderScoreChar, BYTES_PER_NAWCHAR,
     (char*)&wPercentChar, BYTES_PER_NAWCHAR
     );
-#pragma warn(1506)  // warning elimination 
   LikePattern pattern(patternString, exHeap, CharInfo::UNICODE);
   if (pattern.error()) {
     ExRaiseSqlError(exHeap, diagsArea, EXE_INVALID_ESCAPE_SEQUENCE);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_math_func.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_math_func.cpp b/core/sql/exp/exp_math_func.cpp
index b182bf8..d401e6f 100644
--- a/core/sql/exp/exp_math_func.cpp
+++ b/core/sql/exp/exp_math_func.cpp
@@ -105,10 +105,8 @@ ex_expr::exp_return_type ex_function_abs::eval(char *op_data[],
       break;
       
     case REC_BIN16_SIGNED:
-#pragma nowarn(1506)   // warning elimination 
       *(short *)op_data[0] = (*(short *)op_data[1] < 0 ? -*(short *)op_data[1]
 			      : *(short *)op_data[1]);
-#pragma warn(1506)   // warning elimination 
       break;
       
     case REC_BIN32_SIGNED:
@@ -800,9 +798,7 @@ ex_expr::exp_return_type ExFunctionBitOper::eval(char *op_data[],
 
     case ITM_CONVERTTOBITS:
       {
-#pragma nowarn(1506)   // warning elimination 
 	Lng32 len1 = getOperand(1)->getLength(op_data[-MAX_OPERANDS+1]);
-#pragma warn(1506)  // warning elimination 
 	Int32 i;
 	if ( DFS2REC::isDoubleCharacter(getOperand(1)->getDatatype()) ) 
 	  {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_math_func.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_math_func.h b/core/sql/exp/exp_math_func.h
index ccf300b..b1789a4 100644
--- a/core/sql/exp/exp_math_func.h
+++ b/core/sql/exp/exp_math_func.h
@@ -42,7 +42,6 @@
 #include "exp_clause.h"
 #include "exp_clause_derived.h"
 
-#pragma warning ( disable : 4251 )
 
 class ex_function_abs : public ex_function_clause {
 public:
@@ -169,6 +168,5 @@ public:
   // ---------------------------------------------------------------------
 };
 
-#pragma warning ( default : 4251 )
 
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_tuple_desc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_tuple_desc.cpp b/core/sql/exp/exp_tuple_desc.cpp
index e60c7ee..2f6ac8c 100644
--- a/core/sql/exp/exp_tuple_desc.cpp
+++ b/core/sql/exp/exp_tuple_desc.cpp
@@ -452,9 +452,7 @@ Int16 ExpTupleDesc::computeOffsets(UInt32 num_attrs,        /* IN  */
 	    
             if (attrs[i]->getNullFlag())
               {
-#pragma nowarn(1506)   // warning elimination 
                 attrs[i]->setNullIndOffset(offset);	
-#pragma warn(1506)  // warning elimination 
                 offset += attrs[i]->getNullIndicatorLength();   
               }
 
@@ -564,9 +562,7 @@ Int16 ExpTupleDesc::computeOffsets(UInt32 num_attrs,        /* IN  */
 		// Note vcIndicatorLength_ is set to sizeof(Int16) for rowset
 		// SQLVarChars.
 		if (attrs[i]->getNullFlag()){
-#pragma nowarn(1506)   // warning elimination 
 		  attrs[i]->setNullIndOffset(attrStartOffset+sizeof(Int32));
-#pragma warn(1506)  // warning elimination 
 		  elementDataLen += attrs[i]->getNullIndicatorLength();
 		  if (attrs[i]->getVCIndicatorLength() > 0){
 		    attrs[i]->setVCLenIndOffset(attrStartOffset+
@@ -925,9 +921,7 @@ Long ExpTupleDesc::pack(void * space)
 {
   if (! packed())
     {
-#pragma nowarn(1506)   // warning elimination 
       if (attrs_) attrs_.pack(space, numAttrs_);
-#pragma warn(1506)  // warning elimination 
     }
   flags_ |= PACKED;
   return NAVersionedObject::pack(space);
@@ -938,9 +932,7 @@ Int32 ExpTupleDesc::unpack(void * base, void * reallocator)
   if (packed())
     {
       if (attrs_)
-#pragma nowarn(1506)   // warning elimination 
         if (attrs_.unpack(base, numAttrs_, reallocator)) return -1;
-#pragma warn(1506)  // warning elimination 
 
       flags_ &= ~PACKED;
     }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/exp/exp_tuple_desc.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_tuple_desc.h b/core/sql/exp/exp_tuple_desc.h
index 04eacdf..8c017e1 100644
--- a/core/sql/exp/exp_tuple_desc.h
+++ b/core/sql/exp/exp_tuple_desc.h
@@ -58,7 +58,6 @@ typedef NAVersionedObjectPtrArrayTempl<ExpTupleDescPtr> ExpTupleDescPtrPtr;
 typedef NAVersionedObjectPtrTempl<Attributes> AttributesPtr;
 typedef NAVersionedObjectPtrArrayTempl<AttributesPtr> AttributesPtrPtr;
 
-#pragma warning ( disable : 4251 )
 
 
 #define NEG_BIT_MASK 0x0080    //the first bit in a byte - used for finding
@@ -927,6 +926,5 @@ public:
 
 };
 
-#pragma warning ( default : 4251 )
 
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/export/ComDiags.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/ComDiags.cpp b/core/sql/export/ComDiags.cpp
index 65595c4..270423e 100644
--- a/core/sql/export/ComDiags.cpp
+++ b/core/sql/export/ComDiags.cpp
@@ -1225,9 +1225,7 @@ void ComCondition::assignStringMember(char *& memberBuff,const char *const src)
        memberBuff = new char[buffsize];
        assert(memberBuff != NULL);
      }
-#pragma nowarn(1506)   // warning elimination 
      str_cpy(memberBuff,src,buffsize);
-#pragma warn(1506)  // warning elimination 
      memberBuff[buffsize-1]=0;
    }
 }
@@ -1712,9 +1710,7 @@ void ComDiagsArea::enforceLengthLimit()
          // make errors a sequence 1..j, where j = errors_.entries() -
          //                             (numToDiscard-warnings_.entries())
 
-#pragma nowarn(1506)   // warning elimination 
          numToDiscard =  numToDiscard - warnings_.entries();
-#pragma warn(1506)  // warning elimination 
          CollIndex j = errors_.entries() - numToDiscard;
          while (numToDiscard-- != 0) {
             errors_[j]->deAllocate();// remove near end and slide towards front
@@ -1880,7 +1876,6 @@ void ComDiagsArea::unpackObj32(IpcMessageObjType objType,
 // Let us not forget the size of the base class.
 //
 // We do not pack newCondition_.
-#pragma nowarn(770)   // warning elimination 
 IpcMessageObjSize ComDiagsArea::packedLength(void)
 {
   // NOTE: changes to any of the following methods also require
@@ -1989,7 +1984,6 @@ IpcMessageObjSize ComDiagsArea::packedLength32(void)
 
   return size;
 }
-#pragma warn(770)   // warning elimination 
 
 IpcMessageObjSize ComDiagsArea::packObjIntoMessage(char *buffer)
 {
@@ -2285,20 +2279,14 @@ NABoolean ComDiagsArea::checkObj(IpcMessageObjType objType,
 
 Lng32     ComDiagsArea::getNumber () const
 {
-#pragma nowarn(1506)   // warning elimination 
    return errors_.entries() + warnings_.entries();
-#pragma warn(1506)  // warning elimination 
 }
 
 Lng32     ComDiagsArea::getNumber (DgSqlCode::ErrorOrWarning type) const
 {
    switch (type) {
-#pragma nowarn(1506)   // warning elimination 
      case DgSqlCode::ERROR_:	return errors_.entries();
-#pragma warn(1506)  // warning elimination 
-#pragma nowarn(1506)   // warning elimination 
      case DgSqlCode::WARNING_:	return warnings_.entries();
-#pragma warn(1506)  // warning elimination 
      default:			return -1;
    }
 }
@@ -3186,9 +3174,7 @@ static char *copyStringMember(char* src, CollHeap *heap)
   copy = (char*) heap->allocateMemory(buffsize);
   assert(copy!=NULL);
 
-#pragma nowarn(1506)   // warning elimination 
   str_cpy(copy,src,buffsize);
-#pragma warn(1506)  // warning elimination 
   copy[buffsize-1]=0;
 
   return copy;
@@ -3282,18 +3268,14 @@ Lng32 ComDiagsArea::mark() const
 void ComDiagsArea::rewind(Lng32 markValue, NABoolean decId)
 {
    CollIndex  maxError = errors_.entries()-1;
-#pragma nowarn(161)   // warning elimination 
    while (maxError != -1 && errors_[maxError]->getDiagsId() > markValue) {
-#pragma warn(161)  // warning elimination 
        errors_[maxError]->deAllocate();
        NABoolean removed = errors_.removeAt(maxError--); 
        assert(removed);
        if (decId) --maxDiagsId_; // This is the merged line
    }
    CollIndex maxWarning = warnings_.entries()-1;
-#pragma nowarn(161)   // warning elimination 
    while (maxWarning != -1 && warnings_[maxWarning]->getDiagsId() > markValue){
-#pragma warn(161)  // warning elimination 
        warnings_[maxWarning]->deAllocate();
        NABoolean removed = warnings_.removeAt(maxWarning--);
        assert(removed);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/export/ComDiags.h
----------------------------------------------------------------------
diff --git a/core/sql/export/ComDiags.h b/core/sql/export/ComDiags.h
index 13aa97a..fa9b1e5 100644
--- a/core/sql/export/ComDiags.h
+++ b/core/sql/export/ComDiags.h
@@ -729,7 +729,6 @@ NABoolean ComCondition::isLocked () const
 // Class ComDiagsArea
 // -----------------------------------------------------------------------
 
-#pragma warning( disable : 4251 )
 class ComDiagsArea : public IpcMessageObj {
 public:
   // For the ``SQL function'' setting and getting operations, we declare
@@ -1459,7 +1458,6 @@ void          NegateAllErrors  (ComDiagsArea *a)
 {
   a->negateAllErrors();
 }
-// #pragma warning( default : 4251 )
 
 ///////////////////////////////////////////////////////////////
 // These are the inline functions of the ComDiagsArea class. //

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/export/HeapLog.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/HeapLog.cpp b/core/sql/export/HeapLog.cpp
index 902da3c..8afa7f1 100644
--- a/core/sql/export/HeapLog.cpp
+++ b/core/sql/export/HeapLog.cpp
@@ -457,9 +457,7 @@ Lng32 HeapLogRoot::fetchLine( char *buf
     }
 
   Lng32 error = log->fetchLine(&buf[2], 1 /*sqlci*/);
-#pragma nowarn(1506)   // warning elimination 
   *((short*)buf) = strlen(&buf[2]);
-#pragma warn(1506)  // warning elimination 
   if (error == FETCH_EOF)
     control2(flags, LeakDescribe::FLAG_SQLCI);
   return error;
@@ -708,9 +706,7 @@ Lng32 HeapLog::fetchLine( char *buf
 
   if (datalen_ > 0)
     { // Fetch log data from ARKCMP.
-#pragma nowarn(1506)   // warning elimination 
       Lng32 s = strlen(packdata_) + 1;
-#pragma warn(1506)  // warning elimination 
       if (currlen_ >= datalen_ ||
 	  s == 1)
 	{ // eof
@@ -878,8 +874,6 @@ Lng32 HeapLog::fetchLine( char *buf
       close();
       return FETCH_EOF; 
     }
-#pragma nowarn(203)   // warning elimination 
   return 0;
-#pragma warn(203)  // warning elimination 
 }  
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/export/IpcMessageObj.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/IpcMessageObj.cpp b/core/sql/export/IpcMessageObj.cpp
index 4ae4ce3..22b9a0d 100644
--- a/core/sql/export/IpcMessageObj.cpp
+++ b/core/sql/export/IpcMessageObj.cpp
@@ -141,9 +141,7 @@ IpcMessageObjSize IpcMessageObj::packObjIntoMessage(IpcMessageBufferPtr buffer,
   // stored directly following the base class data (this may not be the
   // case if multiple inheritance is used!!!!).
   // ---------------------------------------------------------------------
-#pragma nowarn(1506)   // warning elimination 
   str_cpy_all(buffer, (const char *) &this[1], derivedObjLen);
-#pragma warn(1506)  // warning elimination 
 
   return derivedObjLen + sizeof(IpcMessageObj);
 }
@@ -170,9 +168,7 @@ IpcMessageObjSize IpcMessageObj::packObjIntoMessage32(IpcMessageBufferPtr buffer
   // stored directly following the base class data (this may not be the
   // case if multiple inheritance is used!!!!).
   // ---------------------------------------------------------------------
-#pragma nowarn(1506)   // warning elimination 
   str_cpy_all(buffer, (const char *) &this[1], derivedObjLen);
-#pragma warn(1506)  // warning elimination 
 
   return derivedObjLen + sizeof(IpcMessageObj);
 }
@@ -191,9 +187,7 @@ void IpcMessageObj::unpackObj(IpcMessageObjType /*objType*/,
 
   // copy the rest into the memory following the IpcMessageObj data members
   // (should we allow such a dangerous default implementation?)
-#pragma nowarn(1506)   // warning elimination 
   str_cpy_all((char *) &this[1], buffer, objSize - sizeof(IpcMessageObj));
-#pragma warn(1506)  // warning elimination 
   // - Change the offset in the next ptr to zero
   //
   s_.next_ = NULL;
@@ -213,9 +207,7 @@ void IpcMessageObj::unpackObj32(IpcMessageObjType /*objType*/,
 
   // copy the rest into the memory following the IpcMessageObj data members
   // (should we allow such a dangerous default implementation?)
-#pragma nowarn(1506)   // warning elimination 
   str_cpy_all((char *) &this[1], buffer, objSize - SQL_32BIT_IPC_MESSAGE_OBJ_SIZE);
-#pragma warn(1506)  // warning elimination 
   // - Change the offset in the next ptr to zero
   //
   s_.next_ = NULL;
@@ -334,9 +326,7 @@ IpcMessageObjSize IpcMessageObj::packBaseClassIntoMessage(
          s_.objLength_ = bswap_32(s_.objLength_); 
          s_.refCount_ = bswap_32(s_.refCount_);
       }
-#pragma nowarn(1506)   // warning elimination 
       str_cpy_all(buffer,(const char *)this,copyLen);
-#pragma warn(1506)  // warning elimination 
 
       if (swapBytes)
       {
@@ -702,9 +692,7 @@ IpcMessageObjSize packCharStarIntoBuffer(IpcMessageBufferPtr &buffer,
   if (strPtr==NULL)
      length=0;
   else
-#pragma nowarn(1506)   // warning elimination 
      length=na_wcslen(strPtr)+1; // 1 is for the null-terminator char
-#pragma warn(1506)  // warning elimination 
   length *= sizeof(NAWchar);
 
    // NOT a recursive call.
@@ -791,9 +779,7 @@ NABoolean checkAndUnpackBuffer (
   }
   else
   {
-#pragma nowarn(1506)   // warning elimination 
     str_cpy_all(dataPtr, (char *) buffer, dataLength);
-#pragma warn(1506)  // warning elimination 
     buffer += dataLength;
   }
   return result;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/export/NAAbort.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/NAAbort.cpp b/core/sql/export/NAAbort.cpp
index 9ed3055..262175c 100644
--- a/core/sql/export/NAAbort.cpp
+++ b/core/sql/export/NAAbort.cpp
@@ -215,14 +215,12 @@ void NAAssert(const char* condition, const char * file_, Int32 line_)
    assert_botch_abend(file_, line_, condition);
 }
 
-#pragma nowarn(770)   // warning elimination 
 void assert_botch_no_abend( const char *f, Int32 l, const char * m)
 {
 
 
 }
 
-#pragma warn(770)  // warning elimination 
 void assert_botch_abend( const char *f, Int32 l, const char * m, const char *c)
 {
   NAAssertMutexLock(); // Assure "termination synchronization"

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/export/NABasicObject.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/NABasicObject.cpp b/core/sql/export/NABasicObject.cpp
index 113ade2..524971e 100644
--- a/core/sql/export/NABasicObject.cpp
+++ b/core/sql/export/NABasicObject.cpp
@@ -91,9 +91,7 @@ void* NABasicObject::operator new(size_t t, CollHeap* h, NABoolean failureIsFata
 
 
       p = ::operator new(t);
-#pragma nowarn(1506)   // warning elimination 
       //      HEAPLOG_ADD_ENTRY(p, t, NA_HEAP_BASIC, "NABasic Heap")
-#pragma warn(1506)  // warning elimination 
     }
 
   if (p)
@@ -189,9 +187,7 @@ void* NABasicObject::operator new[](size_t t, CollHeap* h, NABoolean failureIsFa
 
 
       p = ::operator new(t);
-#pragma nowarn(1506)   // warning elimination 
       //      HEAPLOG_ADD_ENTRY(p, t, NA_HEAP_BASIC, "NABasic Heap")
-#pragma warn(1506)  // warning elimination 
     }
 
   if (p)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/export/NAStringDef.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/NAStringDef.cpp b/core/sql/export/NAStringDef.cpp
index 099b51d..6fd471d 100644
--- a/core/sql/export/NAStringDef.cpp
+++ b/core/sql/export/NAStringDef.cpp
@@ -190,12 +190,8 @@ NAString::compareTo(const char* cs2, caseCompare cmp) const
   } else {                  // ignore case
     for (; cs2[i]; ++i) {
       if (i == len) return -1;
-#pragma nowarn(1506)   // warning elimination 
       char c1 = tolower((unsigned char)cs1[i]);
-#pragma warn(1506)  // warning elimination 
-#pragma nowarn(1506)   // warning elimination 
       char c2 = tolower((unsigned char)cs2[i]);
-#pragma warn(1506)  // warning elimination 
       if (c1 != c2) return ((c1 > c2)? 1 : -1);
     }
   }
@@ -214,12 +210,8 @@ NAString::compareTo(const NAString& str, caseCompare cmp) const
   } else {
     size_t i = 0;
     for (; i < len; ++i) {
-#pragma nowarn(1506)   // warning elimination 
       char c1 = tolower((unsigned char)s1[i]);
-#pragma warn(1506)  // warning elimination 
-#pragma nowarn(1506)   // warning elimination 
       char c2 = tolower((unsigned char)s2[i]);
-#pragma warn(1506)  // warning elimination 
       if (c1 != c2) return ((c1 > c2)? 1 : -1);
     }
   }
@@ -529,9 +521,7 @@ NAString::toLower()
   cow();
   register size_t N = length();
   register char* p = fbstring_.begin();
-#pragma nowarn(1506)   // warning elimination 
   while ( N-- ) { *p = tolower((unsigned char)*p); p++;}
-#pragma warn(1506)  // warning elimination 
 }
 
 // Change self to upper case
@@ -541,9 +531,7 @@ NAString::toUpper()
   cow();
   register size_t N = length();
   register char* p = fbstring_.begin();
-#pragma nowarn(1506)   // warning elimination 
   while ( N-- ) { *p = toupper((unsigned char)*p); p++;}
-#pragma warn(1506)  // warning elimination 
 }
 
 // Change self to upper case
@@ -559,9 +547,7 @@ NAString::toUpper8859_1()
         (*p != 0xff) &&    // small y with diaeresis has no upcase equiv in 8859-1
         (*p != 0xdf))      // small german sharp s has no upcase euqiv in 8859-1
     {
-#pragma nowarn(1506)   // warning elimination 
       *p = *p - 32; // convert to uppercase equivalent
-#pragma warn(1506)  // warning elimination 
     }
     p++;
   }
@@ -642,9 +628,7 @@ toLower(const NAString& str)
   register const char* uc = str.data();
   register       char* lc = (char*)temp.data();
   // Guard against tolower() being a macro:
-#pragma nowarn(1506)   // warning elimination 
   while( N-- ) { *lc++ = tolower((unsigned char)*uc); uc++; }
-#pragma warn(1506)  // warning elimination 
   return temp;
 }
 
@@ -657,9 +641,7 @@ toUpper(const NAString& str)
   register const char* uc = str.data();
   register       char* lc = (char*)temp.data();
   // Guard against toupper() being a macro:
-#pragma nowarn(1506)   // warning elimination 
   while( N-- ) { *lc++ = toupper((unsigned char)*uc); uc++; }
-#pragma warn(1506)  // warning elimination 
   return temp;
 }
 
@@ -856,9 +838,7 @@ NASubString::toLower()
      str_->cow();
      register char* p = (char*)(str_->data() + begin_); // Cast away constness
      size_t N = extent_;
-#pragma nowarn(1506)   // warning elimination 
      while( N-- ) { *p = tolower((unsigned char)*p); p++;}
-#pragma warn(1506)  // warning elimination 
   }
 }
 
@@ -871,9 +851,7 @@ NASubString::toUpper()
      str_->cow();
      register char* p = (char*)(str_->data() + begin_); // Cast away constness
      size_t N = extent_;
-#pragma nowarn(1506)   // warning elimination 
      while( N-- ) { *p = toupper((unsigned char)*p); p++;}
-#pragma warn(1506)  // warning elimination 
   }
 }
 
@@ -967,14 +945,10 @@ operator<<(ostream& os, const NAString& s)
     size_t wid = os.width();
     wid = (len < wid) ? wid - len : 0;
     Lng32 flags = os.flags();
-#pragma nowarn(1506)   // warning elimination 
     os.width(wid);
-#pragma warn(1506)  // warning elimination 
     if (wid && !(flags & ios::left))
       os << "";  // let the ostream fill
-#pragma nowarn(1506)   // warning elimination 
     os.rdbuf()->sputn((char*)s.data(), s.length());
-#pragma warn(1506)  // warning elimination 
     if (wid && (flags & ios::left))
       os << "";  // let the ostream fill
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/export/NAVersionedObject.cpp
----------------------------------------------------------------------
diff --git a/core/sql/export/NAVersionedObject.cpp b/core/sql/export/NAVersionedObject.cpp
index 7eed5ac..64fb041 100644
--- a/core/sql/export/NAVersionedObject.cpp
+++ b/core/sql/export/NAVersionedObject.cpp
@@ -150,9 +150,7 @@ void NAVersionedObject::makeRoomForNewVersion(
     {
       char *src = (char *)this + oldSubClassSize;
       char *des = (char *)this + newSubClassSize;
-#pragma nowarn(1506)   // warning elimination 
       short siz = imageSize_ - newSubClassSize;
-#pragma warn(1506)  // warning elimination 
       str_cpy_all(des,src,siz);
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/export/NAVersionedObject.h
----------------------------------------------------------------------
diff --git a/core/sql/export/NAVersionedObject.h b/core/sql/export/NAVersionedObject.h
index 39ef55e..4a569fa 100644
--- a/core/sql/export/NAVersionedObject.h
+++ b/core/sql/export/NAVersionedObject.h
@@ -1438,7 +1438,6 @@ protected:
 // ---------------------------------------------------------------------
 typedef NAVersionedObjectPtrTempl<NAVersionedObject> NAVersionedObjectPtr;
 
-#pragma warning ( disable : 4251 )
 
 // ---------------------------------------------------------------------
 // Class NAVersionedObject
@@ -1836,7 +1835,6 @@ private:
 };  // END of class declaration for NAVersionedObject ------------------
 
 
-#pragma warning ( default : 4251 )
 
 #endif  // ---------------------------------------------------- EOF ----
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/generator/GenExpGenerator.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenExpGenerator.cpp b/core/sql/generator/GenExpGenerator.cpp
index c0c6108..3171c39 100644
--- a/core/sql/generator/GenExpGenerator.cpp
+++ b/core/sql/generator/GenExpGenerator.cpp
@@ -271,9 +271,7 @@ Attributes * ExpGenerator::convertNATypeToAttributes
 
       attr->setRowsetSize(rsSize);
       result = attr;
-#pragma nowarn(1506)   // warning elimination
       attr->setNullFlag(naType->supportsSQLnull());
-#pragma warn(1506)  // warning elimination
       attr->setNullIndicatorLength((short) naType->getSQLnullHdrSize());
       attr->setVCIndicatorLength((short) naType->getVarLenHdrSize());
       attr->setDatatype(naType->getFSDatatype());
@@ -282,9 +280,7 @@ Attributes * ExpGenerator::convertNATypeToAttributes
       if (naType_x.getTypeQualifier() == NA_ROWSET_TYPE) {
 	if (((SQLRowset *)(&naType_x))->useTotalSize()) {
 	  // This indicates us to use the whole array size
-#pragma nowarn(1506)   // warning elimination
  	  attr->setLength(sizeof(Lng32) + (attr->getRowsetSize() * naType->getTotalSize()));
-#pragma warn(1506)  // warning elimination
 	  result->setUseTotalRowsetSize();
 	  ((SQLRowset *)(&naType_x))->useTotalSize() = FALSE;
 	}
@@ -348,19 +344,13 @@ Attributes * ExpGenerator::convertNATypeToAttributes
           {
             attr->setPrecision(REC_DTCODE_SECOND);
           }
-#pragma nowarn(1506)   // warning elimination
           attr->setScale(datetimeType->getFractionPrecision());
-#pragma warn(1506)  // warning elimination
         }
       else if (naType->getTypeQualifier() == NA_INTERVAL_TYPE)
         {
           const IntervalType *intervalType = (const IntervalType *) naType;
-#pragma nowarn(1506)   // warning elimination
           attr->setPrecision(intervalType->getLeadingPrecision());
-#pragma warn(1506)  // warning elimination
-#pragma nowarn(1506)   // warning elimination
           attr->setScale(intervalType->getFractionPrecision());
-#pragma warn(1506)  // warning elimination
           if (attr->getDatatype() == REC_INT_FRACTION)
           {
            attr->setDatatype(REC_INT_SECOND);
@@ -395,16 +385,12 @@ Attributes * ExpGenerator::convertNATypeToAttributes
             BigNum(numericType->getNominalSize(),
                    numericType->getPrecision(),
                    (short)numericType->getScale(),
-#pragma nowarn(1506)   // warning elimination
                    numericType->isUnsigned());
-#pragma warn(1506)  // warning elimination
 
 	  attr->setRowsetSize(rsSize);
           result = attr;
 
-#pragma nowarn(1506)   // warning elimination
           attr->setNullFlag(naType->supportsSQLnull());
-#pragma warn(1506)  // warning elimination
           attr->setNullIndicatorLength((short) naType->getSQLnullHdrSize());
           attr->setVCIndicatorLength((short) naType->getVarLenHdrSize());
           attr->setDatatype(numericType->getFSDatatype());
@@ -413,9 +399,7 @@ Attributes * ExpGenerator::convertNATypeToAttributes
 	  if (naType_x.getTypeQualifier() == NA_ROWSET_TYPE) {
 	    if (((SQLRowset *)(&naType_x))->useTotalSize()) {
 	      // This indicates us to use the whole array size
-#pragma nowarn(1506)   // warning elimination
 	      attr->setLength(sizeof(Lng32) + (attr->getRowsetSize() * naType->getTotalSize()));
-#pragma warn(1506)  // warning elimination
 	      result->setUseTotalRowsetSize();
 	      ((SQLRowset *)(&naType_x))->useTotalSize() = FALSE;
 	    }
@@ -1088,14 +1072,12 @@ ItemExpr * ExpGenerator::matchScalesNoCast(const ValueId & source,
   // Upscale or downscale the source to the target scale.  If the source scale
   // is the same as the target scale, return the source tree unchanged.
   //
-#pragma nowarn(1506)   // warning elimination
   Lng32 sourceScale = (source.getType().getTypeQualifier() == NA_NUMERIC_TYPE)
     ? ((NumericType &) source.getType()).getScale()
     : ((IntervalType &) source.getType()).getFractionPrecision();
   Lng32 targetScale = (targetType.getTypeQualifier() == NA_NUMERIC_TYPE)
     ? ((NumericType &) targetType).getScale()
     : ((IntervalType &) targetType).getFractionPrecision();
-#pragma warn(1506)  // warning elimination
   if (sourceScale == targetScale)
     return retTree;
 
@@ -1157,7 +1139,6 @@ ItemExpr * ExpGenerator::convertIntervalToNumeric(const ValueId & source)
   //
   // Convert the source interval to numeric, bind the tree, and return it.
   //
-#pragma nowarn(1506)   // warning elimination
   const Int16 DisAmbiguate = 0;
   retTree = new(wHeap())
     Cast(retTree, new(wHeap()) SQLNumeric(wHeap(), TRUE, /* signed */
@@ -1165,7 +1146,6 @@ ItemExpr * ExpGenerator::convertIntervalToNumeric(const ValueId & source)
 				     sourceInterval.getFractionPrecision(),
 				     DisAmbiguate, // added for 64bit proj.
 				     sourceInterval.supportsSQLnull()));
-#pragma warn(1506)  // warning elimination
   retTree->bindNode(generator->getBindWA());
 
   return retTree;
@@ -2956,9 +2936,7 @@ NABoolean ExpGenerator::processKeyEncodingOptimization(
   CollIndex i = 0;
   while ( i < prevColNumber )
     {
-#pragma nowarn(1506)   // warning elimination
       if (allColumns.getColumn(i)->getType()->getVarLenHdrSize() > 0)
-#pragma warn(1506)  // warning elimination
 	return TRUE;
       else
 	i++;
@@ -2971,27 +2949,21 @@ NABoolean ExpGenerator::processKeyEncodingOptimization(
     {
       ValueId valId = indexKey[i];
 
-#pragma nowarn(1506)   // warning elimination
       NAColumn * naCol = indexKeyColumns.getColumn(i);
-#pragma warn(1506)  // warning elimination
 
       Attributes * thisAttr = generator->getMapInfo(valId)->getAttr();
 
-#pragma warning (disable : 4018)  //warning elimination
       if ((valId.getType().isEncodingNeeded() == TRUE)  ||
 	  ((valId.getType().getTypeQualifier() == NA_CHARACTER_TYPE) &&  
 	   ((((CharType&)valId.getType()).isCaseinsensitive())  ||
            (CollationInfo::isSystemCollation(((CharType&)valId.getType()).getCollation())))) ||
 	  (valId.getType().supportsSQLnull()  == TRUE)  ||
 	  (indexKeyColumns.isAscending(i) == FALSE)     ||
-#pragma nowarn(270)   // warning elimination
 	  ((naCol->getPosition() - prevColNumber) < 0)   ||
-#pragma warn(270)  // warning elimination
 	  ((naCol->getPosition() - prevColNumber) > 1)   ||
 	  ((thisAttr->getOffset() - prevAttr->getOffset())
 	   > prevAttr->getStorageLength())               ||
           (!naCol->isStoredOnDisk()))
-#pragma warning (default : 4018)  //warning elimination
 	return TRUE;
 
       prevColNumber = naCol->getPosition();
@@ -3404,9 +3376,7 @@ ItemExpr * ExpGenerator::generateKeyCast(const ValueId vid,
       relativeMin = new(wHeap()) Cast(relativeMin,targetType);
 
       // Add an encode node here.
-#pragma nowarn(1506)   // warning elimination
       relativeMin = new(wHeap()) CompEncode(relativeMin, desc_flag);
-#pragma warn(1506)  // warning elimination
 
       ItemExpr * relativeMax = new(wHeap()) ConstValue(targetType->newCopy(wHeap()),
 						       desc_flag,
@@ -3414,9 +3384,7 @@ ItemExpr * ExpGenerator::generateKeyCast(const ValueId vid,
       relativeMax = new(wHeap()) Cast(relativeMax,targetType);
 
       // Add an encode node here.
-#pragma nowarn(1506)   // warning elimination
       relativeMax = new(wHeap()) CompEncode(relativeMax, desc_flag);
-#pragma warn(1506)  // warning elimination
 
       knode = createExprTree("CASE WHEN @A1 = 0 THEN @A2 WHEN @A1 < 0 THEN @A3 ELSE @A4 END",
                              0,
@@ -3615,13 +3583,11 @@ short ExpGenerator::generateInputExpr(const ValueIdList &val_id_list,
 	  //	  attr[0] = generator->getMapInfo(val_id)->getAttr();
 	  attr[0] = generator->getAttr(item_expr);
 
-#pragma nowarn(1506)   // warning elimination
 	  if (getShowplan())
 	    attr[1] =
 	      new(wHeap()) ShowplanAttributes(val_id,
 					      convertNAString(item_expr->getText(),
 							      generator->wHeap()));
-#pragma warn(1506)  // warning elimination
 
 	  num_input_entries++;
 
@@ -4591,13 +4557,9 @@ short ExpGenerator::assignAtpAndAtpIndex(ValueIdList valIdList,
     {
       Attributes * attr = generator->getMapInfo(valIdList[i])->getAttr();
       if (atp >= 0)
-#pragma nowarn(1506)   // warning elimination
 	attr->setAtp(atp);
-#pragma warn(1506)  // warning elimination
       if (atpIndex >= 0)
-#pragma nowarn(1506)   // warning elimination
 	attr->setAtpIndex(atpIndex);
-#pragma warn(1506)  // warning elimination
     }
 
   return 0;
@@ -4681,9 +4643,7 @@ short ExpGenerator::endExprGen(ex_expr ** expr, short gen_last_clause)
   // get the PCode mode from the ctor ExpGenerator and set it in the
   // expression itself.  This allows us to regenerate PCode at runtime
   // (for versioning) with the same mode specified at compile time.
-#pragma nowarn(1506)   // warning elimination
   (*expr)->setPCodeMode( getPCodeMode() );
-#pragma warn(1506)  // warning elimination
 
   // Get default low-level opt flags and prevent predicate reordering from
   // happening if this expression represents a case statement.
@@ -4728,33 +4688,23 @@ short ExpGenerator::endExprGen(ex_expr ** expr, short gen_last_clause)
 
   // Set the constant expression storage length and area.
   //
-#pragma nowarn(1506)   // warning elimination
   char * constants_area = placeConstants(getConstantList(), getConstLength());
-#pragma warn(1506)  // warning elimination
   (*expr)->setConstantsArea(constants_area);
-#pragma nowarn(1506)   // warning elimination
   (*expr)->setConstsLength(getConstLength());
-#pragma warn(1506)  // warning elimination
 
   // Set the persistent expression storage length and initialization area.
   //
   char *persistentInitializationArea
-#pragma nowarn(1506)   // warning elimination
     = placeConstants(getPersistentList(), persistentLength());
-#pragma warn(1506)  // warning elimination
   (*expr)->persistentInitializationArea() = persistentInitializationArea;
-#pragma nowarn(1506)   // warning elimination
   (*expr)->persistentLength() = persistentLength();
-#pragma warn(1506)  // warning elimination
   (*expr)->persistentArea()
     = getSpace()->allocateAlignedSpace(persistentLength());
 
 
   // Set the temporary expression storage length.
   //
-#pragma nowarn(1506)   // warning elimination
   (*expr)->setTempsLength(getTempsLength());
-#pragma warn(1506)  // warning elimination
 
   // set the pointer to the first clause in the ex_expr
   (*expr)->setClauses((ex_clause *)(getClauseList()->getElement()));
@@ -4788,9 +4738,7 @@ short ExpGenerator::endExprGen(ex_expr ** expr, short gen_last_clause)
   Lng32 totalExprLen =
     getSpace()->getAllocatedSpaceSize() - (*expr)->getLength();
 
-#pragma nowarn(1506)   // warning elimination
   (*expr)->setLength(totalExprLen);
-#pragma warn(1506)  // warning elimination
 #ifdef NEW_LEAN_EXPR
   // If tempSpace exists, then the entire expression was written to it, so
   // we need to now make a "lean" copy of it and copy it back into the
@@ -5053,9 +5001,7 @@ short ExpGenerator::endExprGen(ex_expr ** expr, short gen_last_clause)
 	    getSpace()->getAllocatedSpaceSize() - len1;
 	  pcodeExprLen = ((ex_expr_lean*)newExpr)->getPCodeSize();
 
-#pragma nowarn(1506)   // warning elimination
 	  ((ex_expr_lean*)newExpr)->setLength(totalExprLen);
-#pragma warn(1506)  // warning elimination
 	}
 
       delete tempSpace;
@@ -5265,9 +5211,7 @@ NABoolean GenEvalPredicate(ItemExpr * rootPtr)
 					       workCriDesc,
 					       space);
 
-#pragma nowarn(1506)   // warning elimination
   dp2Expr->setPCodeMode( expGen.getPCodeMode() );
-#pragma warn(1506)  // warning elimination
 
   dp2Expr->getExpr()->fixup(0,0,0,NULL,NULL,FALSE,NULL);
 
@@ -5321,9 +5265,7 @@ short ExpGenerator::generateSamplingExpr(const ValueId &valId, ex_expr **expr,
   GenAssert(attr->getAtpIndex() == 1,
 	    "Sampling result must be a persistent expression variable.");
 
-#pragma nowarn(1506)   // warning elimination
   returnFactorOffset = attr->getOffset();
-#pragma warn(1506)  // warning elimination
 
   return 0;
 }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/generator/GenFastTransport.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenFastTransport.cpp b/core/sql/generator/GenFastTransport.cpp
index b91e76d..bc788d9 100644
--- a/core/sql/generator/GenFastTransport.cpp
+++ b/core/sql/generator/GenFastTransport.cpp
@@ -38,9 +38,7 @@
 #include "Generator.h"
 #include "GenExpGenerator.h"
 #include "sql_buffer.h"
-#pragma warning ( disable : 4244 )
 #include "ExplainTuple.h"
-#pragma warning ( default : 4244 )
 #include "ExplainTupleMaster.h"
 #include "ComQueue.h"
 //#include "UdfDllInteraction.h"

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/generator/GenItemExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenItemExpr.cpp b/core/sql/generator/GenItemExpr.cpp
index ef904bd..ead1926 100644
--- a/core/sql/generator/GenItemExpr.cpp
+++ b/core/sql/generator/GenItemExpr.cpp
@@ -314,9 +314,7 @@ short BiArith::codeGen(Generator * generator)
   if (attr[0]->isComplexType())
     {
       eg->addTempsLength(((ComplexType *)attr[0])->setTempSpaceInfo(getOperatorType(),
-#pragma nowarn(1506)   // warning elimination 
 								    eg->getTempsLength()));
-#pragma warn(1506)  // warning elimination 
     }
 			      
   attr[0]->resetlastdaymonthflag();
@@ -353,9 +351,7 @@ short BiArithSum::codeGen(Generator * generator)
   if (attr[0]->isComplexType())
     {
       eg->addTempsLength(((ComplexType *)attr[0])->setTempSpaceInfo(getOperatorType(),
-#pragma nowarn(1506)   // warning elimination 
 								    eg->getTempsLength()));
-#pragma warn(1506)  // warning elimination 
     }
 			      
   ex_arith_sum_clause * arith_clause =
@@ -382,9 +378,7 @@ short BiArithCount::codeGen(Generator * generator)
   if (attr[0]->isComplexType())
     {
       eg->addTempsLength(((ComplexType *)attr[0])->setTempSpaceInfo(getOperatorType(),
-#pragma nowarn(1506)   // warning elimination 
 								    eg->getTempsLength()));
-#pragma warn(1506)  // warning elimination 
     }
 			      
   ex_arith_count_clause * arith_clause =

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/781d97e6/core/sql/generator/GenItemFunc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenItemFunc.cpp b/core/sql/generator/GenItemFunc.cpp
index 8b40c9a..f1c4618 100644
--- a/core/sql/generator/GenItemFunc.cpp
+++ b/core/sql/generator/GenItemFunc.cpp
@@ -110,7 +110,6 @@ short BuiltinFunction::codeGen(Generator * generator)
           case CharInfo::ISO88591:
           case CharInfo::UTF8:
           // case CharInfo::SJIS:  // Uncomment this if we ever support SJIS
-#pragma nowarn(1506)   // warning elimination 
            function_clause =
                new(generator->getSpace()) ex_like_clause_char(getOperatorType()
                                                    ,1+getArity()
@@ -138,9 +137,7 @@ short BuiltinFunction::codeGen(Generator * generator)
              function_clause->setNoPCodeAvailable(TRUE);
 
            break;
-#pragma warn(1506)   // warning elimination 
           case CharInfo::UCS2:
-#pragma nowarn(1506)   // warning elimination 
            function_clause = new(generator->getSpace()) 
                                    ex_like_clause_doublebyte(ITM_LIKE_DOUBLEBYTE
                                                    ,1+getArity()
@@ -148,7 +145,6 @@ short BuiltinFunction::codeGen(Generator * generator)
                                                    ,space
                                                    );
            break;
-#pragma warn(1506)   // warning elimination 
           default:
 	    GenAssert(0, "unknown value for bytes-per-char.");
         }
@@ -330,7 +326,6 @@ short BuiltinFunction::codeGen(Generator * generator)
 	  }
 	
 
-#pragma nowarn(1506)   // warning elimination 
         const CharType& substringOperandType = 
            (CharType&)((child(0)->getValueId()).getType());
 
@@ -355,7 +350,6 @@ short BuiltinFunction::codeGen(Generator * generator)
 	    GenAssert(0, "unknown value for bytes-per-char.");
         }
       }
-#pragma warn(1506)   // warning elimination 
       
       break;
       
@@ -885,13 +879,11 @@ short BitOperFunc::codeGen(Generator * generator)
   if (generator->getExpGenerator()->genItemExpr(this, &attr, (1 + getArity()), -1) == 1)
     return 0;
 
-#pragma nowarn(1506)   // warning elimination 
   ex_clause * function_clause = NULL;
   function_clause =
     new(generator->getSpace()) ExFunctionBitOper(getOperatorType(), 
 						 (1+getArity()),
 						 attr, generator->getSpace());
-#pragma warn(1506)  // warning elimination 
   
   generator->getExpGenerator()->linkClause(this, function_clause);
 
@@ -1417,12 +1409,9 @@ short Cast::codeGen(Generator * generator)
   // if temp space is needed for this operation, set it.
   if (attr[0]->isComplexType())
     {
-#pragma nowarn(1506)   // warning elimination 
       eg->addTempsLength(((ComplexType *)attr[0])->setTempSpaceInfo(getOperatorType(),
 								    eg->getTempsLength()));
-#pragma warn(1506)  // warning elimination 
     }
-#pragma nowarn(1506)   // warning elimination 		      
   ex_conv_clause * conv_clause;
   if(attr[0]->getNullFlag())  //if target is nullable
     conv_clause = new(generator->getSpace()) ex_conv_clause(getOperatorType(), attr,
@@ -1440,7 +1429,6 @@ short Cast::codeGen(Generator * generator)
                                                     reverseDataErrorConversionFlag_,
                                                     noStringTruncationWarnings(),
                                                     FALSE);
-#pragma warn(1506)  // warning elimination 
 
   conv_clause->setTreatAllSpacesAsZero(treatAllSpacesAsZero());
 
@@ -1791,7 +1779,6 @@ short MathFunc::codeGen(Generator * generator)
   if (generator->getExpGenerator()->genItemExpr(this, &attr, (1 + getArity()), -1) == 1)
     return 0;
 
-#pragma nowarn(1506)   // warning elimination 
 
   ex_clause * function_clause = NULL;
   function_clause =
@@ -1799,7 +1786,6 @@ short MathFunc::codeGen(Generator * generator)
 					      (1+getArity()),
 					      attr, generator->getSpace());
   
-#pragma warn(1506)  // warning elimination 
   
   generator->getExpGenerator()->linkClause(this, function_clause);
 
@@ -2091,16 +2077,12 @@ short RangeLookup::codeGen(Generator * generator)
   // copy 2 Attribute pointers and 2 showplan attribute pointers to array with 3 pointers
   str_cpy_all((char *) attr3,
 	      (const char *) attr2,
-#pragma nowarn(1506)   // warning elimination 
 	      sizeof(Attributes *) * (numAttrs-1));
-#pragma warn(1506)  // warning elimination 
   if (numAttrsShowPlan)
     {
       str_cpy_all((char *) &attr3[numAttrs],
 		  (const char *) &attr2[numAttrs-1],
-#pragma nowarn(1506)   // warning elimination 
 		  sizeof(Attributes *) * (numAttrs-1));
-#pragma warn(1506)  // warning elimination 
     }
 
   // make a ConstValue that is a huge character column with all the
@@ -2131,13 +2113,11 @@ short RangeLookup::codeGen(Generator * generator)
   // ...and showplan equivalent, if needed
   if (numAttrsShowPlan)
     {
-#pragma nowarn(1506)   // warning elimination 
       attr3[numAttrs + numAttrsShowPlan - 1] = new (generator->wHeap())
 	ShowplanAttributes(
 	     constValSplitKeys->getValueId(),
 	     convertNAString("SplitKeysForRangeRepartitioning",
 			     generator->wHeap()));
-#pragma warn(1506)  // warning elimination 
     }
 
   // now that we prepared all the inputs, add the clause itself
@@ -2316,13 +2296,11 @@ short RandomNum::codeGen(Generator *generator)
 
   if (generator->getExpGenerator()->genItemExpr(this, &attr, (1 + getArity()), -1) == 1)
     return 0;
-#pragma nowarn(1506)   // warning elimination 
   ex_clause *function_clause = new (space) ExFunctionRandomNum(ITM_RANDOMNUM,
 							       (1+getArity()),
 							       simpleRandom_,
                                                                attr, 
                                                                space);
-#pragma warn(1506)  // warning elimination 
   
   if (function_clause)
     generator->getExpGenerator()->linkClause(this, function_clause);