From dd3cb24cc056a8b460acb2b525035a919c76ba6a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Apr 2015 18:05:50 +0200 Subject: [PATCH] Fix another harmless but annoying libtiff warning. Disable the warning given by clang for converting (smaller) "int" to (larger) "void*" in 64 bit OS X builds. --- src/tiff/libtiff/tif_unix.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/tiff/libtiff/tif_unix.c b/src/tiff/libtiff/tif_unix.c index 0bddf7ca89..f2a4583dea 100644 --- a/src/tiff/libtiff/tif_unix.c +++ b/src/tiff/libtiff/tif_unix.c @@ -154,11 +154,22 @@ TIFFFdOpen(int fd, const char* name, const char* mode) { TIFF* tif; + /* Avoid warning about casting int fd to larger thandle_t in 64 bits. */ +#ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wint-to-void-pointer-cast" +#endif + tif = TIFFClientOpen(name, mode, (thandle_t) fd, _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc, _tiffSizeProc, _tiffMapProc, _tiffUnmapProc); + +#ifdef __clang__ + #pragma clang diagnostic pop +#endif + if (tif) tif->tif_fd = fd; return (tif);