summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorKinan Hakim <kinan@google.com>2016-01-21 11:31:06 +0100
committerKinan Hakim <kinan@google.com>2016-01-21 11:31:06 +0100
commit5f50cecd84eede0503ae9543fb4ea706d0fb70ea (patch)
tree277ac2ae0c2286c1d6aef1a6fcc71c5ac741510b /source
parentd5da7529f7d89fa1d67191dbd22eec48cde081e2 (diff)
downloaddng_sdk-5f50cecd84eede0503ae9543fb4ea706d0fb70ea.tar.gz
Fix warnings on Apple.
Diffstat (limited to 'source')
-rw-r--r--source/dng_camera_profile.cpp2
-rw-r--r--source/dng_fingerprint.cpp2
-rw-r--r--source/dng_fingerprint.h8
-rw-r--r--source/dng_gain_map.cpp2
-rw-r--r--source/dng_info.cpp2
-rw-r--r--source/dng_lossless_jpeg.cpp2
-rw-r--r--source/dng_mosaic_info.cpp4
-rw-r--r--source/dng_resample.cpp2
-rw-r--r--source/dng_shared.cpp2
-rw-r--r--source/dng_utils.h6
10 files changed, 16 insertions, 16 deletions
diff --git a/source/dng_camera_profile.cpp b/source/dng_camera_profile.cpp
index 03bb158..13d4f39 100644
--- a/source/dng_camera_profile.cpp
+++ b/source/dng_camera_profile.cpp
@@ -898,7 +898,7 @@ void dng_camera_profile::ReadHueSatMap (dng_stream &stream,
/*****************************************************************************/
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
void dng_camera_profile::Parse (dng_stream &stream,
diff --git a/source/dng_fingerprint.cpp b/source/dng_fingerprint.cpp
index 8aa2673..f9ea77a 100644
--- a/source/dng_fingerprint.cpp
+++ b/source/dng_fingerprint.cpp
@@ -448,7 +448,7 @@ void dng_md5_printer::Decode (uint32 *output,
// MD5 basic transformation. Transforms state based on block.
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
void dng_md5_printer::MD5Transform (uint32 state [4],
diff --git a/source/dng_fingerprint.h b/source/dng_fingerprint.h
index 58c0762..0dd0b25 100644
--- a/source/dng_fingerprint.h
+++ b/source/dng_fingerprint.h
@@ -226,7 +226,7 @@ class dng_md5_printer
// FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
static inline void FF (uint32 &a,
@@ -242,7 +242,7 @@ class dng_md5_printer
a += b;
}
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
static inline void GG (uint32 &a,
@@ -258,7 +258,7 @@ class dng_md5_printer
a += b;
}
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
static inline void HH (uint32 &a,
@@ -274,7 +274,7 @@ class dng_md5_printer
a += b;
}
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
static inline void II (uint32 &a,
diff --git a/source/dng_gain_map.cpp b/source/dng_gain_map.cpp
index d80aa5b..e12272b 100644
--- a/source/dng_gain_map.cpp
+++ b/source/dng_gain_map.cpp
@@ -248,7 +248,7 @@ void dng_gain_map_interpolator::ResetColumn ()
/*****************************************************************************/
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
dng_gain_map::dng_gain_map (dng_memory_allocator &allocator,
diff --git a/source/dng_info.cpp b/source/dng_info.cpp
index 3bfc834..f00fb1a 100644
--- a/source/dng_info.cpp
+++ b/source/dng_info.cpp
@@ -407,7 +407,7 @@ bool dng_info::ValidateIFD (dng_stream &stream,
/*****************************************************************************/
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
void dng_info::ParseIFD (dng_host &host,
diff --git a/source/dng_lossless_jpeg.cpp b/source/dng_lossless_jpeg.cpp
index 7ddf0fe..0750bb5 100644
--- a/source/dng_lossless_jpeg.cpp
+++ b/source/dng_lossless_jpeg.cpp
@@ -1678,7 +1678,7 @@ inline int32 dng_lossless_decoder::HuffDecode (HuffmanTable *htbl)
*--------------------------------------------------------------
*/
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("undefined")))
#endif
inline void dng_lossless_decoder::HuffExtend (int32 &x, int32 s)
diff --git a/source/dng_mosaic_info.cpp b/source/dng_mosaic_info.cpp
index 6d49894..fd1e828 100644
--- a/source/dng_mosaic_info.cpp
+++ b/source/dng_mosaic_info.cpp
@@ -286,7 +286,7 @@ class dng_bilinear_pattern
private:
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
uint32 DeltaRow (uint32 row, int32 delta)
@@ -294,7 +294,7 @@ __attribute__((no_sanitize("unsigned-integer-overflow")))
return (row + fPatRows + (uint32) delta) % fPatRows;
}
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
uint32 DeltaCol (uint32 col, int32 delta)
diff --git a/source/dng_resample.cpp b/source/dng_resample.cpp
index 6552176..464fdb1 100644
--- a/source/dng_resample.cpp
+++ b/source/dng_resample.cpp
@@ -583,7 +583,7 @@ dng_resample_task::dng_resample_task (const dng_image &srcImage,
/*****************************************************************************/
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
dng_rect dng_resample_task::SrcArea (const dng_rect &dstArea)
diff --git a/source/dng_shared.cpp b/source/dng_shared.cpp
index 063388c..431b682 100644
--- a/source/dng_shared.cpp
+++ b/source/dng_shared.cpp
@@ -96,7 +96,7 @@ dng_camera_profile_info::~dng_camera_profile_info ()
/*****************************************************************************/
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
bool dng_camera_profile_info::ParseTag (dng_stream &stream,
diff --git a/source/dng_utils.h b/source/dng_utils.h
index 7654fba..7d2bfb2 100644
--- a/source/dng_utils.h
+++ b/source/dng_utils.h
@@ -28,7 +28,7 @@
// The unsigned integer overflow is intended here since a wrap around is used to
// calculate the abs() in the branchless version.
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
inline uint32 Abs_int32 (int32 x)
@@ -486,7 +486,7 @@ inline uint32 Floor_uint32 (real32 x)
}
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("float-cast-overflow")))
#endif
inline uint32 Floor_uint32 (real64 x)
@@ -1138,7 +1138,7 @@ inline int32 Mulsh86 (int32 x, int32 y)
// This is the ACM standard 30 bit generator:
// x' = (x * 16807) mod 2^31-1
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__APPLE__)
__attribute__((no_sanitize("unsigned-integer-overflow")))
#endif
inline uint32 DNG_Random (uint32 seed)