Fixing build on clang [#METR-2807].

This commit is contained in:
Alexey Milovidov 2016-03-07 07:16:03 +03:00
parent 9371fd1923
commit d1e3ea4e96
3 changed files with 6 additions and 1 deletions

View File

@ -136,6 +136,7 @@ endif(WIN32)
if (UNIX AND NOT ANDROID )
add_definitions( -DPOCO_OS_FAMILY_UNIX )
add_definitions( -Wno-unused-private-field -Wno-unused-local-typedef -Wno-for-loop-analysis -Wno-unknown-pragmas )
# Standard 'must be' defines
if (APPLE)
add_definitions( -DPOCO_HAVE_IPv6 -DPOCO_NO_STAT64)

View File

@ -1504,7 +1504,7 @@ z_streamp strm;
{
struct inflate_state FAR *state;
if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
if (strm == Z_NULL || strm->state == Z_NULL) return (unsigned)(-1L) << 16;
state = (struct inflate_state FAR *)strm->state;
return ((long)(state->back) << 16) +
(state->mode == COPY ? state->length :

View File

@ -550,8 +550,10 @@ int PCRE::TryMatch(const StringPiece& text,
return rc;
}
#if !__clang__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
bool PCRE::DoMatchImpl(const StringPiece& text,
Anchor anchor,
@ -592,7 +594,9 @@ bool PCRE::DoMatchImpl(const StringPiece& text,
return true;
}
#if !__clang__
#pragma GCC diagnostic pop
#endif
bool PCRE::DoMatch(const StringPiece& text,
Anchor anchor,