summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c++/src/H5Exception.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h
index 308d958..7b69e79 100644
--- a/c++/src/H5Exception.h
+++ b/c++/src/H5Exception.h
@@ -66,9 +66,11 @@ class __DLLCPP__ Exception {
private:
// Because 'string' is not instantiated at compilation time, this
-// warning is displayed; but the class is exported so the warning
-// is harmless
+// warning is displayed when building DLL; but the class is exported
+// so the warning is harmless
+#if defined(WIN32)
#pragma warning(disable: 4251)
+#endif
string detailMessage;
string funcName;
};