From e6ac2ca3c9c745e46eddf877ad4082a89e902401 Mon Sep 17 00:00:00 2001 From: KeySecure Date: Wed, 13 Jan 2016 20:19:19 +0800 Subject: [PATCH] make Xcode 7.2 happy. --- 3rdparty/libjpeg/jquant2.c | 6 +++--- 3rdparty/zlib/gzread.c | 2 +- 3rdparty/zlib/gzwrite.c | 4 ++-- modules/calib3d/src/rho.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/3rdparty/libjpeg/jquant2.c b/3rdparty/libjpeg/jquant2.c index fdf3b20889..2ac3f841b7 100644 --- a/3rdparty/libjpeg/jquant2.c +++ b/3rdparty/libjpeg/jquant2.c @@ -265,9 +265,9 @@ typedef struct { INT32 volume; /* The number of nonzero histogram cells within this box */ long colorcount; -} box; +} _box; -typedef box * boxptr; +typedef _box * boxptr; LOCAL(boxptr) @@ -546,7 +546,7 @@ select_colors (j_decompress_ptr cinfo, int desired_colors) /* Allocate workspace for box list */ boxlist = (boxptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box)); + ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(_box)); /* Initialize one box containing whole space */ numboxes = 1; boxlist[0].c0min = 0; diff --git a/3rdparty/zlib/gzread.c b/3rdparty/zlib/gzread.c index bf4538eb27..68ad01d993 100644 --- a/3rdparty/zlib/gzread.c +++ b/3rdparty/zlib/gzread.c @@ -27,7 +27,7 @@ local int gz_load(state, buf, len, have) *have = 0; do { - ret = read(state->fd, buf + *have, len - *have); + ret = (int) read(state->fd, buf + *have, len - *have); if (ret <= 0) break; *have += ret; diff --git a/3rdparty/zlib/gzwrite.c b/3rdparty/zlib/gzwrite.c index aa767fbf63..e9525417c8 100644 --- a/3rdparty/zlib/gzwrite.c +++ b/3rdparty/zlib/gzwrite.c @@ -81,7 +81,7 @@ local int gz_comp(state, flush) /* write directly if requested */ if (state->direct) { - got = write(state->fd, strm->next_in, strm->avail_in); + got = (int) write(state->fd, strm->next_in, strm->avail_in); if (got < 0 || (unsigned)got != strm->avail_in) { gz_error(state, Z_ERRNO, zstrerror()); return -1; @@ -98,7 +98,7 @@ local int gz_comp(state, flush) if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && (flush != Z_FINISH || ret == Z_STREAM_END))) { have = (unsigned)(strm->next_out - state->x.next); - if (have && ((got = write(state->fd, state->x.next, have)) < 0 || + if (have && ((got = (int) write(state->fd, state->x.next, have)) < 0 || (unsigned)got != have)) { gz_error(state, Z_ERRNO, zstrerror()); return -1; diff --git a/modules/calib3d/src/rho.cpp b/modules/calib3d/src/rho.cpp index 2f27728a2d..95259b76bd 100644 --- a/modules/calib3d/src/rho.cpp +++ b/modules/calib3d/src/rho.cpp @@ -44,7 +44,7 @@ */ /* Includes */ -#include +#include "precomp.hpp" #include #include #include