Преглед на файлове

Fix more warnings

Fix CLang warnings for /* in comment and missing return statements.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman преди 13 години
родител
ревизия
aa34f39f63

+ 1 - 1
cmake_modules/commonSetup.cmake

@@ -123,7 +123,7 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
       SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -fno-default-inline -fno-inline-functions")
     endif ()
     if (CMAKE_COMPILER_IS_CLANGXX)
-      SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=logical-op-parentheses -Werror=bool-conversions")
+      SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=logical-op-parentheses -Werror=bool-conversions -Werror=return-type -Werror=comment")
     endif()
     # All of these are defined in platform.h too, but need to be defned before any system header is included
     ADD_DEFINITIONS (-D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64=1 -D__USE_FILE_OFFSET64=1)

+ 10 - 16
common/thorhelper/thortparse.cpp

@@ -1316,25 +1316,21 @@ void TomitaParser::reset()
     iter.invalidate();
 }
 
-/*
- * To be done to finish multi parser
+#if 0
+To be done to finish multi parser
  a) Save reductions on separate stack if >1 token at same position
  b) Use two states for the single token case, and swap between to avoid copy.
 
-/******************
-* Implementing a multiple lex parser:
-* 
-* 1) Parser maintain an ordered list of current start positions.
-     active[position-firstPosition] - use pointers into an array of states;  States are cached on a list.
-* 2) lex from the first position in the list
-* 3) pass end position to parser - selects where new nodes get placed.
-* 4) Reductions have to be placed on to a separate list for each token, since dependant.
-* 4) Parser has associative array on position[x].  
-*    Items are processed from position x to position y
-***/
+Implementing a multiple lex parser:
 
+ 1) Parser maintain an ordered list of current start positions.
+     active[position-firstPosition] - use pointers into an array of states;  States are cached on a list.
+ 2) lex from the first position in the list
+ 3) pass end position to parser - selects where new nodes get placed.
+ 4) Reductions have to be placed on to a separate list for each token, since dependant.
+ 4) Parser has associative array on position[x].
+    Items are processed from position x to position y
 
-/*
 Notes:
 
 Caching: 
@@ -1344,8 +1340,6 @@ Caching:
 Local ambiguity packing:
   When shifting a value, if it gets commoned up, and one of the common branches shifts the same symbol, and the preceeding state for that branch is the same, then common up that node.
 
-  */
-#if 0
 ToDo:
 
 * Do some more planning re:

+ 1 - 1
dali/base/dasds.ipp

@@ -625,7 +625,7 @@ public:
                 out.append('[').append(childPositions.item(p-1)).append(']');
         }
         out.append(currentChild->queryName());
-        out.append('[').append(childPositions.tos()).append(']');
+        return out.append('[').append(childPositions.tos()).append(']');
     }
 
     virtual IPropertyTree *queryChild(IPropertyTree *parent, const char *path)

+ 1 - 1
esp/services/ws_dfu/ws_dfuView.hpp

@@ -238,7 +238,7 @@ private:
 
         Owned<IProperties> props(createProperties(out.str()));
 
-        props->getPropInt("id");
+        return props->getPropInt("id");
     }
 
 

+ 2 - 2
esp/services/ws_ecl/ws_ecl_service.cpp

@@ -1129,7 +1129,7 @@ void appendEclInputXsds(StringBuffer &content, IPropertyTree *xsd, BoolHash &add
                 StringBuffer temp;
                 if (!stricmp(aname, "dataset"))
                 {
-                    /*
+#if 0
                     content.appendf("<xsd:complexType name=\"%s\"><xsd:sequence>", schema_name);
                     IPropertyTreeIterator *children = item.getElements("xs:complexType/xs:sequence/*");
                     ForEach(*children)
@@ -1144,7 +1144,7 @@ void appendEclInputXsds(StringBuffer &content, IPropertyTree *xsd, BoolHash &add
                         //toXML(&child, content);
                     }
                     content.appendf("</xsd:sequence></xsd:complexType>", aname);
-                    */
+#endif
                 }
                 else
                 {

+ 1 - 1
system/jlib/jbroadcast.ipp

@@ -53,7 +53,7 @@ public:
 
     MCPacketHeader *header;
     void *queryData() { return pktData; }
-    MCPacketHeader *detachPacket() { (MCPacketHeader *) mb.detach(); }
+    MCPacketHeader *detachPacket() { return (MCPacketHeader *) mb.detach(); }
 
 private:
     void *pktData;

+ 4 - 1
system/jlib/jexcept.cpp

@@ -1083,9 +1083,12 @@ void *EnableSEHtranslation()
 {
 #ifdef NOSEH
     return NULL;
-#endif
+#else
 #ifdef _WIN32
     return _set_se_translator( CSEHException::Translate );
+#else
+    UNIMPLEMENTED;
+#endif
 #endif
 }
 

+ 2 - 2
tools/hidl/hidlcomp.cpp

@@ -3033,7 +3033,7 @@ void EspMessageInfo::write_esp_ipp()
         outs("};\n\n");
 
         // array
-        /*
+#if 0
         //outf("MAKEValueArray(C%s,  %sArray);\n\n", name_, name_);
         outf("inline C%s Array__Member2Param(C%s &src)              { return src; }\n", name_, name_);
         outf("inline void Array__Assign(C%s & dest, C%s const & src){ dest = src; }\n", name_, name_);
@@ -3043,7 +3043,7 @@ void EspMessageInfo::write_esp_ipp()
         outf("MAKEArrayOf(C%s, C%s, %sArray)\n\n", name_,name_,name_);      
         //outf("class %sArray : public ArrayOf<C%s, C%s> {};\n\n",name_,name_,name_);
         outs("\n");
-        */
+#endif
 
         return;
     }