فهرست منبع

HPCC-2695 More clang warnings

Fixed more warnings generated by Clang compiler.

Another attempt at a version that doesn;t cause warnings on any compiler...

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 سال پیش
والد
کامیت
c3759fd814
3فایلهای تغییر یافته به همراه7 افزوده شده و 16 حذف شده
  1. 3 6
      thorlcr/graph/thgraph.cpp
  2. 3 8
      thorlcr/thorutil/thormisc.cpp
  3. 1 2
      thorlcr/thorutil/thormisc.hpp

+ 3 - 6
thorlcr/graph/thgraph.cpp

@@ -448,8 +448,7 @@ void CGraphElementBase::ActPrintLog(IException *e, const char *format, ...)
 
 void CGraphElementBase::ActPrintLog(IException *e)
 {
-    va_list args;
-    ::ActPrintLogArgs(this, e, thorlog_all, MCexception(e), NULL, args);
+    ActPrintLog(e, "%s", "");
 }
 
 void CGraphElementBase::abort(IException *e)
@@ -1662,8 +1661,7 @@ void CGraphBase::GraphPrintLog(IException *e, const char *format, ...)
 
 void CGraphBase::GraphPrintLog(IException *e)
 {
-    va_list args;
-    ::GraphPrintLogArgs(this, e, thorlog_null, MCdebugProgress, NULL, args);
+    GraphPrintLog(e, "%s", "");
 }
 
 void CGraphBase::setLogging(bool tf)
@@ -2751,8 +2749,7 @@ void CActivityBase::ActPrintLog(IException *e, const char *format, ...)
 
 void CActivityBase::ActPrintLog(IException *e)
 {
-    va_list args;
-    ::ActPrintLogArgs(&queryContainer(), e, thorlog_all, MCexception(e), NULL, args);
+    ActPrintLog(e, "%s", "");
 }
 
 bool CActivityBase::fireException(IException *e)

+ 3 - 8
thorlcr/thorutil/thormisc.cpp

@@ -161,8 +161,7 @@ void ActPrintLog(const CActivityBase *activity, IException *e, const char *forma
 
 void ActPrintLog(const CActivityBase *activity, IException *e)
 {
-    va_list args;
-    ActPrintLogArgs(&activity->queryContainer(), e, thorlog_null, MCexception(e, MSGCLS_error), NULL, args);
+    ActPrintLog(activity, e, "%s", "");
 }
 
 void GraphPrintLogArgsPrep(StringBuffer &res, CGraphBase *graph, const ActLogEnum flags, const LogMsgCategory &logCat, const char *format, va_list args)
@@ -401,9 +400,7 @@ IThorException *MakeActivityException(CActivityBase *activity, IException *e, co
 
 IThorException *MakeActivityException(CActivityBase *activity, IException *e)
 {
-    va_list args;
-    IThorException *e2 = _MakeActivityException(activity->queryContainer(), e, NULL, args);
-    return e2;
+    return MakeActivityException(activity, e, "%s", "");
 }
 
 IThorException *MakeActivityWarning(CActivityBase *activity, int code, const char *format, ...)
@@ -448,9 +445,7 @@ IThorException *MakeActivityException(CGraphElementBase *container, IException *
 
 IThorException *MakeActivityException(CGraphElementBase *container, IException *e)
 {
-    va_list args;
-    IThorException *e2 = _MakeActivityException(*container, e, NULL, args);
-    return e2;
+    return MakeActivityException(container, e, "%s", "");
 }
 
 IThorException *MakeActivityWarning(CGraphElementBase *container, int code, const char *format, ...)

+ 1 - 2
thorlcr/thorutil/thormisc.hpp

@@ -345,8 +345,7 @@ inline void ActPrintLog(const CGraphElementBase *container, IException *e, const
 }
 inline void ActPrintLog(const CGraphElementBase *container, IException *e)
 {
-    va_list args;
-    ActPrintLogArgs(container, e, thorlog_null, MCexception(e, MSGCLS_error), NULL, args);
+    ActPrintLogEx(container, e, thorlog_null, MCexception(e, MSGCLS_error), "%s", "");
 }
 extern graph_decl void GraphPrintLogArgsPrep(StringBuffer &res, CGraphBase *graph, const ActLogEnum flags, const LogMsgCategory &logCat, const char *format, va_list args);
 extern graph_decl void GraphPrintLogArgs(CGraphBase *graph, IException *e, const ActLogEnum flags, const LogMsgCategory &logCat, const char *format, va_list args);