瀏覽代碼

HPCC-11119 Fix some warnings in the generated code

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 11 年之前
父節點
當前提交
27907b8fb0
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 5 1
      ecl/hqlcpp/hqlhtcpp.cpp
  2. 1 1
      plugins/stringlib/stringlib.cpp

+ 5 - 1
ecl/hqlcpp/hqlhtcpp.cpp

@@ -2356,6 +2356,10 @@ void ActivityInstance::addConstructorMetaParameter()
         OwnedHqlExpr metaExpr = createQuoted(s.str(), makeBoolType());
         constructorArgs.append(*metaExpr.getClear());
     }
+    else if ((kind == TAKwhen_action) || (kind == TAKemptyaction))
+    {
+        constructorArgs.append(*createTranslatedOwned(createValue(no_nullptr, makeBoolType())));
+    }
 }
 
 ParentExtract * ActivityInstance::createNestedExtract()
@@ -11147,7 +11151,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityPipeThrough(BuildCtx & ctx, IH
     if (expr->hasAttribute(repeatAtom))
     {
         //virtual const char * getPipeProgram() { return "grep"; }
-        instance->startctx.addQuoted("virtual char * getPipeProgram() { return NULL; }");
+        instance->startctx.addQuoted("virtual const char * getPipeProgram() { return NULL; }");
 
         BuildCtx pipeCtx(instance->startctx);
         pipeCtx.addQuotedCompound("virtual char * getNameFromRow(const void * _self)");

+ 1 - 1
plugins/stringlib/stringlib.cpp

@@ -61,7 +61,7 @@ static const char * EclDefinition =
 "  string StringToProperCase(const string src) : c,pure,entrypoint='slStringToProperCase';\n"
 "  string StringToCapitalCase(const string src) : c,pure,entrypoint='slStringToCapitalCase';\n"
 "  string StringToTitleCase(const string src) : c,pure,entrypoint='slStringToTitleCase';\n"
-"  integer4 StringCompareIgnoreCase(const string src1, string src2) : c,pure,entrypoint='slStringCompareIgnoreCase';\n"
+"  integer4 StringCompareIgnoreCase(const string src1, const string src2) : c,pure,entrypoint='slStringCompareIgnoreCase';\n"
 "  string StringReverse(const string src) : c,pure,entrypoint='slStringReverse';\n"
 "  string StringFindReplace(const string src, const string stok, const string rtok) : c,pure,entrypoint='slStringFindReplace';\n"
 "  string StringCleanSpaces(const string src) : c,pure,entrypoint='slStringCleanSpaces'; \n"