浏览代码

Merge pull request #10275 from richardkchapman/clang-osx

HPCC-18057 OSX build break from latest clang

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 8 年之前
父节点
当前提交
7166facadd
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      system/jlib/jfile.cpp
  2. 1 1
      system/jlib/jptree.cpp

+ 2 - 2
system/jlib/jfile.cpp

@@ -3326,7 +3326,7 @@ public:
     }
 
     virtual bool isValid()  { return false; }
-    virtual IFile & query() { return *(IFile *)NULL; }
+    virtual IFile & query() { throwUnexpected(); }
     virtual bool isDir() {  return false; }
 
 };
@@ -3889,7 +3889,7 @@ public:
     {
         if (isValid())
             return *item(idx).file;
-        return *(IFile *) NULL;
+        throwUnexpected();
     }
     virtual StringBuffer &getName(StringBuffer &buf)
     {

+ 1 - 1
system/jlib/jptree.cpp

@@ -56,7 +56,7 @@ public:
     virtual bool first() override { return false; }
     virtual bool next() override { return false; }
     virtual bool isValid() override { return false; }
-    virtual IPropertyTree & query() override { assertex(false); return *(IPropertyTree *)NULL; }
+    virtual IPropertyTree & query() override { throwUnexpected(); }
 } *nullPTreeIterator;
 
 IPropertyTreeIterator *createNullPTreeIterator() { return LINK(nullPTreeIterator); } // initialize in init mod below.