Browse Source

HPCC-15760 __declspec(noreturn) needed with __attribute__((noreturn))

Signed-off-by: James Noss <james.noss@lexisnexis.com>
James Noss 9 years ago
parent
commit
47bcd71d77

+ 1 - 1
plugins/cassandra/cassandraembed.cpp

@@ -591,7 +591,7 @@ static const char *getTypeName(CassValueType type)
     default: return "UNKNOWN";
     }
 }
-static void typeError(const char *expected, const CassValue *value, const RtlFieldInfo *field) __attribute__((noreturn));
+__declspec(noreturn) static void typeError(const char *expected, const CassValue *value, const RtlFieldInfo *field) __attribute__((noreturn));
 
 static void typeError(const char *expected, const CassValue *value, const RtlFieldInfo *field)
 {

+ 3 - 3
plugins/cassandra/cassandraembed.hpp

@@ -20,9 +20,9 @@
 
 namespace cassandraembed {
 
-extern void UNSUPPORTED(const char *feature) __attribute__((noreturn));
-extern void failx(const char *msg, ...) __attribute__((noreturn))  __attribute__((format(printf, 1, 2)));
-extern void fail(const char *msg) __attribute__((noreturn));
+__declspec(noreturn) extern void UNSUPPORTED(const char *feature) __attribute__((noreturn));
+__declspec(noreturn) extern void failx(const char *msg, ...) __attribute__((format(printf, 1, 2), noreturn));
+__declspec(noreturn) extern void fail(const char *msg) __attribute__((noreturn));
 extern void check(CassError rc);
 extern bool isInteger(const CassValueType t);
 extern bool isString(CassValueType t);

+ 2 - 2
plugins/javaembed/javaembed.cpp

@@ -63,7 +63,7 @@ extern "C" EXPORT bool getECLPluginDefinition(ECLPluginDefinitionBlock *pb)
     return true;
 }
 
-static void UNSUPPORTED(const char *feature) __attribute__((noreturn));
+__declspec(noreturn) static void UNSUPPORTED(const char *feature) __attribute__((noreturn));
 
 static void UNSUPPORTED(const char *feature)
 {
@@ -3031,7 +3031,7 @@ protected:
     jobject instance; //instance of service object to call methods on
 private:
 
-    void typeError(const char *ECLtype) __attribute__((noreturn))
+    __declspec(noreturn) void typeError(const char *ECLtype) __attribute__((noreturn))
     {
         const char *javaType;
         int javaLen = 0;

+ 4 - 4
plugins/mysql/mysqlembed.cpp

@@ -37,7 +37,7 @@
 #endif
 
 
-static void UNSUPPORTED(const char *feature) __attribute__((noreturn));
+__declspec(noreturn) static void UNSUPPORTED(const char *feature) __attribute__((noreturn));
 
 static void UNSUPPORTED(const char *feature)
 {
@@ -70,8 +70,8 @@ extern "C" EXPORT bool getECLPluginDefinition(ECLPluginDefinitionBlock *pb)
 
 namespace mysqlembed {
 
-static void failx(const char *msg, ...) __attribute__((noreturn))  __attribute__((format(printf, 1, 2)));
-static void fail(const char *msg) __attribute__((noreturn));
+__declspec(noreturn) static void failx(const char *msg, ...) __attribute__((format(printf, 1, 2), noreturn));
+__declspec(noreturn) static void fail(const char *msg) __attribute__((noreturn));
 
 static void failx(const char *message, ...)
 {
@@ -326,7 +326,7 @@ protected:
 
 // Conversions from MySQL values to ECL data
 
-static void typeError(const char *expected, const RtlFieldInfo *field) __attribute__((noreturn));
+__declspec(noreturn) static void typeError(const char *expected, const RtlFieldInfo *field) __attribute__((noreturn));
 
 static void typeError(const char *expected, const RtlFieldInfo *field)
 {

+ 1 - 1
plugins/pyembed/pyembed.cpp

@@ -511,7 +511,7 @@ static int countFields(const RtlFieldInfo * const * fields)
 
 // Conversions from Python objects to ECL data
 
-static void typeError(const char *expected, const RtlFieldInfo *field) __attribute__((noreturn));
+__declspec(noreturn) static void typeError(const char *expected, const RtlFieldInfo *field) __attribute__((noreturn));
 
 static void typeError(const char *expected, const RtlFieldInfo *field)
 {

+ 2 - 2
plugins/sqlite3/sqlite3.cpp

@@ -35,7 +35,7 @@
 #define EXPORT
 #endif
 
-static void UNSUPPORTED(const char *feature) __attribute__((noreturn));
+__declspec(noreturn) static void UNSUPPORTED(const char *feature) __attribute__((noreturn));
 
 static void UNSUPPORTED(const char *feature)
 {
@@ -88,7 +88,7 @@ public:
 
 // Conversions from SqLite3 values to ECL data
 
-static void typeError(const char *expected, const RtlFieldInfo *field) __attribute__((noreturn));
+__declspec(noreturn) static void typeError(const char *expected, const RtlFieldInfo *field) __attribute__((noreturn));
 
 static void typeError(const char *expected, const RtlFieldInfo *field)
 {

+ 2 - 2
plugins/v8embed/v8embed.cpp

@@ -59,14 +59,14 @@ extern "C" EXPORT bool getECLPluginDefinition(ECLPluginDefinitionBlock *pb)
     return true;
 }
 
-static void UNSUPPORTED(const char *feature) __attribute__((noreturn));
+__declspec(noreturn) static void UNSUPPORTED(const char *feature) __attribute__((noreturn));
 
 static void UNSUPPORTED(const char *feature)
 {
     throw MakeStringException(-1, "UNSUPPORTED feature: %s not supported in v8embed plugin", feature);
 }
 
-static void typeError(const char *expected, const RtlFieldInfo *field) __attribute__((noreturn));
+__declspec(noreturn) static void typeError(const char *expected, const RtlFieldInfo *field) __attribute__((noreturn));
 
 static void typeError(const char *expected, const RtlFieldInfo *field)
 {