Browse Source

HPCC-18057 OSX build break from latest clang

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 years ago
parent
commit
6ec2767077
2 changed files with 3 additions and 3 deletions
  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.