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

HPCC-12307 Add __declspec(noreturn) to functions

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday преди 10 години
родител
ревизия
c5f4a4127a
променени са 4 файла, в които са добавени 9 реда и са изтрити 9 реда
  1. 1 1
      ecl/eclagent/eclagent.ipp
  2. 1 1
      ecl/hqlcpp/hqlcpp.ipp
  3. 6 6
      rtl/eclrtl/eclrtl.hpp
  4. 1 1
      system/jlib/jexcept.hpp

+ 1 - 1
ecl/eclagent/eclagent.ipp

@@ -515,7 +515,7 @@ public:
     }
 
     virtual void fail(int code, char const * str);
-    void failv(int code, char const * fmt, ...) __attribute__((format(printf, 3, 4), noreturn));
+    __declspec(noreturn) void failv(int code, char const * fmt, ...) __attribute__((format(printf, 3, 4), noreturn));
     virtual int queryLastFailCode();
     virtual void getLastFailMessage(size32_t & outLen, char * & outStr, const char * tag);
     virtual void getEventName(size32_t & outLen, char * & outStr);

+ 1 - 1
ecl/hqlcpp/hqlcpp.ipp

@@ -868,7 +868,7 @@ public:
 
 // Helper functions
 
-    void ThrowStringException(int code,const char *format, ...) __attribute__((format(printf, 3, 4), noreturn));            // override the global function to try and add more context information
+    __declspec(noreturn) void ThrowStringException(int code,const char *format, ...) __attribute__((format(printf, 3, 4), noreturn));            // override the global function to try and add more context information
 
     void buildAddress(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
     void buildBlockCopy(BuildCtx & ctx, IHqlExpression * tgt, CHqlBoundExpr & src);

+ 6 - 6
rtl/eclrtl/eclrtl.hpp

@@ -386,12 +386,12 @@ ECLRTL_API unsigned rtlCrcVUnicode(UChar const * k, unsigned initval);
 
 ECLRTL_API unsigned rtlRandom();
 ECLRTL_API void rtlSeedRandom(unsigned value);
-ECLRTL_API void rtlFail(int code, const char *msg) __attribute__((noreturn));
-ECLRTL_API void rtlSysFail(int code, const char *msg) __attribute__((noreturn));
-ECLRTL_API void rtlFailUnexpected() __attribute__((noreturn));
-ECLRTL_API void rtlFailOnAssert() __attribute__((noreturn));
-ECLRTL_API void rtlFailDivideByZero() __attribute__((noreturn));
-ECLRTL_API void rtlThrowOutOfMemory(int code, const char *msg) __attribute__((noreturn));
+__declspec(noreturn) ECLRTL_API void rtlFail(int code, const char *msg) __attribute__((noreturn));
+__declspec(noreturn) ECLRTL_API void rtlSysFail(int code, const char *msg) __attribute__((noreturn));
+__declspec(noreturn) ECLRTL_API void rtlFailUnexpected() __attribute__((noreturn));
+__declspec(noreturn) ECLRTL_API void rtlFailOnAssert() __attribute__((noreturn));
+__declspec(noreturn) ECLRTL_API void rtlFailDivideByZero() __attribute__((noreturn));
+__declspec(noreturn) ECLRTL_API void rtlThrowOutOfMemory(int code, const char *msg) __attribute__((noreturn));
 
 ECLRTL_API void rtlReportFieldOverflow(unsigned size, unsigned max, const char * name);
 ECLRTL_API void rtlReportRowOverflow(unsigned size, unsigned max);

+ 1 - 1
system/jlib/jexcept.hpp

@@ -72,7 +72,7 @@ IException jlib_decl *makeStringException(int code, const char *why);
 IException jlib_decl *makeStringExceptionV(MessageAudience aud, int code, const char *why, ...) __attribute__((format(printf, 3, 4)));
 IException jlib_decl *makeStringExceptionVA(MessageAudience aud, int code, const char *why, va_list args);
 IException jlib_decl *makeStringException(MessageAudience aud, int code, const char *why);
-void jlib_decl throwStringExceptionV(int code, const char *format, ...) __attribute__((format(printf, 2, 3), noreturn));
+__declspec(noreturn) void jlib_decl throwStringExceptionV(int code, const char *format, ...) __attribute__((format(printf, 2, 3), noreturn));
 
 // Macros for legacy names of above functions